aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Switch.qml
Commit message (Collapse)AuthorAgeFilesLines
* Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: de-couple foreground and primaryTextColorJ-P Nurmi2016-11-161-1/+1
| | | | | | | | | | | | In order to get the ComboBox colors right, it must be possible to query the original primary text color value. It was very convenient to make Material.primaryTextColor return custom Material.foreground colors, because that way we didn't have to touch our QML files, but this approach is no longer usable. Task-number: QTBUG-57167 Change-Id: Iee003e96112b919dc7c84a906e4f5691b0f2a6ab Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make hoverEnabled propagate to childrenJ-P Nurmi2016-10-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Hover effects can be sometimes a bit disturbing. This change makes it possible to conveniently disable hover effects for a tree of controls in one go. For example, to disable hover effects for a page including its header, footer, and all list items: Page { hoverEnabled: false header: ... footer: ... ListView { delegate: ... } } [ChangeLog][Controls][Important Behavior Changes] Control::hoverEnabled has been made to inherit to children, to make it possible to disable hover effects for a tree of controls in one place. Change-Id: Ia87144f2cc04957a32f89d3313816b91d97db635 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update all QtQuick imports in src/imports/controlsJ-P Nurmi2016-10-041-1/+1
| | | | | | | | | Most were importing 2.6, some 2.4, and some 2.7. Use consistently the latest available Qt Quick version 2.8. This can be easily tracked to the corresponding Qt version. Change-Id: Ic231b3cc0cb5d2d5cf806fe11c4ff3fd557d09e0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: determine the default hoverEnabled value from QStyleHintsJ-P Nurmi2016-07-221-0/+2
| | | | | | Task-number: QTBUG-50003 Change-Id: I4809638c7ddaa4ca6fb99dbc734edb3641ecea05 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: rename ripple color propertiesJ-P Nurmi2016-07-211-1/+1
| | | | | | | They are no longer specific to CheckBoxes, but used in most controls. Change-Id: I404aeab706479d0b666529ebdb09caa6b8085cae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: implement ripple effect for SwitchDelegateJ-P Nurmi2016-07-111-0/+9
| | | | | | Task-number: QTBUG-50003 Change-Id: I33629bd06c125113408a7f5b11dea72821285876 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-3/+3
| | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: remove qdoc markersJ-P Nurmi2016-06-081-4/+0
| | | | | | | | | | | | | The original plan was to include the default implementation (of all styles, if we could make the snippets collapsiple) in the customization docs. Since the default implementations tend to include internal types, in the end we went the other way and wrote dedicated example snippets for the customization docs. Therefore these markers no longer server a purpose, but just add unnecessary extra bytes for the QML parser to read. Change-Id: Ic511d7ce7a032429626ee75517d69d21b21412a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: fix SwitchDelegate press colorJ-P Nurmi2016-05-101-2/+0
| | | | | | | | | | | | Elevation is required to get a shadow for the indicator, but it also affects the press color, which is undesired. To avoid a darker press color than the other delegates have, elevate only the indicator instead of the whole delegate. Unfortunately, this results to two Material attached object instances for the delegate, so it must be blacklisted in tst_sanity... Change-Id: I8b607ba8f7493fd34a4bdc131a5bfdc5a39159ae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: Add proper elevation supportMichael Spencer2016-05-041-0/+2
| | | | | | | | | | | | - Added an ElevationEffect component based on elevation shadows from Angular Material - Use it on Button, ToolBar, ComboBox, Drawer, Pane, Popup, Menu, and Switch - Add an elevation property to the Material attached object - Update the button colors based on the elevation property Change-Id: I5152e1a56bdcb1016cc4f945a16ef510e0cdece6 Task-number: QTBUG-51276 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-2/+2
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.templates 1.0 => QtQuick.Templates 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | | | | | | Even though there never was such thing is QtQuick.Templates 1.0, we'll use version 2.0 to keep it in sync with QtQuick.Controls 2.0 (next step). The templates define (and in the future, revision) the API of the controls, so the two must have the same version or it will get messy. Docs and plugins.qmltypes will be updated in follow up commits. Change-Id: Idc2e76f32f348ba35eb4b1fa167c6868300aa910 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add SwitchDelegateMitch Curtis2016-04-131-48/+2
| | | | | | | | | | | SwitchDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to Switch) to reflect what is most commonly seen on mobile. Change-Id: I6f8fca8d1a8c91f2cb9d8bbbb685ad163712dfa1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Use Control.activeKeyFocus instead of Item.activeFocusJ-P Nurmi2016-04-111-1/+1
| | | | | | | | | | This makes the controls visualize focus only when interacting with keys, so this basically allows us to set for example Qt.StrongFocus policy by default on buttons and friends. Change-Id: I6c81c58b7acfd2bc592bdd12d804e7e48ee65e95 Task-number: QTBUG-51796 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-02-251-1/+1
|\ | | | | | | | | | | | | Conflicts: src/templates/qquickrangeslider_p.h Change-Id: Ibe8ec18a7e22080f69f316d0394af1d03517ce93
| * Material: add missing focus highlightsJ-P Nurmi2016-02-221-1/+1
| | | | | | | | | | | | | | Change-Id: Id678a095a56f7494c9f32160326ba667a6c0dc28 Task-number: QTBUG-51257 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Switch: migrate from label to contentItemJ-P Nurmi2016-02-061-12/+8
| | | | | | | | | | Change-Id: Ic287fc207b689d5f4a252a527b536272ad94c057 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-311-8/+8
|\| | | | | | | | | | | | | | | | | Conflicts: src/templates/qquickpopup.cpp src/templates/qquickpopup_p_p.h src/templates/qquickspinbox_p.h Change-Id: Ief25ad2d27410f62e90879f60499ed87359406c3
| * Material: adjust sizes of checkable controlsNikita Krupenko2016-01-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Made Switch indicator and handle smaller to be more like the native switch on Android. Also, increased the sizes of Switch and its Ripple CheckBox, and RadioButton to to correspond minimum touch target size 48x48. Change-Id: Icce70215910b677d989182fbb3b40161033601f8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-281-11/+6
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qtlabsmaterialstyleplugin.cpp src/templates/qquickapplicationwindow_p.h src/templates/qquickcombobox.cpp src/templates/qquickcombobox_p.h src/templates/qquickpopup.cpp Change-Id: Ibd87e907bc8abf1f675147761ea8bb0b40722478
| * Material: move DropShadows back to layer.effectJ-P Nurmi2016-01-251-11/+6
| | | | | | | | | | | | | | | | QTBUG-49979 was fixed, so we can switch back to using layer.effect, which typically leads to one less item and much less bindings. Change-Id: I7d1d1462a90c674b5f849134bb6ac8fe6ff0f231 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Support static buildsJ-P Nurmi2016-01-131-0/+1
|/ | | | | Change-Id: I17bb9131603da912597777b2ec0b9be3894ed858 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material: fix drop shadowsJ-P Nurmi2015-12-151-6/+12
| | | | | Change-Id: Ic4b1152a0a8a28a64721f064ccd09b669a12e795 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Specify baseline offsetsJ-P Nurmi2015-11-251-0/+1
| | | | | | Change-Id: I4845a7beac2edc0f0bcc1c810edd7d9e86f31c87 Task-number: QTBUG-49468 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Material styleMitch Curtis2015-11-121-0/+124
Change-Id: I93662a53b42858a5b65154c5ede334182e738dde Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>