aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialstyle_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename QQuickStyleAttached to QQuickAttachedObjectJ-P Nurmi2017-03-221-3/+3
| | | | | | | | | This is becoming a generic recursive attached object type that can be used for palettes too, which are planned to be used for the upcoming image-based style. Change-Id: I693d307ea16e73540ec9519b2ab18a314ff44272 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-171-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * 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>
* | Whitespace cleanupsJ-P Nurmi2016-11-031-1/+0
|/ | | | | Change-Id: Ia075694a7dc43d72d07221b569467fcebdb411fb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-191-0/+4
|\ | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml src/imports/controls/material/qquickmaterialstyle.cpp Change-Id: I00b533e28407f87a31588e92109a468a5bfb4cc8
| * Material: introduce an active and disabled icon colorsKonstantin Ritt2016-10-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://material.google.com/style/icons.html#icons-system-icons > The standard opacity for an active icon on a light background is 54% (#000000). An inactive icon, which is lower in the visual hierarchy, should have an opacity of 26% (#000000). > The standard opacity for an active icon on a dark background is 100% (#FFFFFF). An inactive icon, which is lower in the visual hierarchy, should have an opacity of 30% (#FFFFFF). Change-Id: I5916855cd0a4005ee55ac781207ac9cf4d078a34 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-141-2/+0
|\| | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h Change-Id: Ie7b4a114ad27a4cad337c91e8ebcf696b0e845d7
| * Remove unused QQuickMaterialStylePrivate forward declarationMitch Curtis2016-09-121-2/+0
| | | | | | | | | | Change-Id: Ibe09155db15603475e9060332191eb7f5223bfc1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-061-0/+2
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * Material: fix ToolBar to respect Material.backgroundJ-P Nurmi2016-09-061-0/+2
| | | | | | | | | | | | Task-number: QTBUG-55687 Change-Id: I815291847bad72ae58b66dc70b510ce11cd88b8d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-021-2/+0
|\| | | | | | | Change-Id: I82da1e547c4ead1181ade19f77c62651c00998a3
| * Cleanup unused QQuickMaterialStyle::drawerBackgroundColorJ-P Nurmi2016-09-021-2/+0
| | | | | | | | | | | | | | Drawer uses Material.dialogColor Change-Id: I4af7c5920a3603685fdca9d39b23f7db9edd09df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-231-0/+10
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qquickmaterialstyle.cpp src/imports/controls/universal/qquickuniversalstyle.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquicktooltip.cpp tests/auto/auto.pro Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
| * Material: document the attached style propertiesMitch Curtis2016-08-191-0/+10
| | | | | | | | | | Change-Id: I8349ec366c75b9480533bb9b61a3748e09e9560e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: rename ripple color propertiesJ-P Nurmi2016-07-211-4/+4
| | | | | | | | | | | | | | They are no longer specific to CheckBoxes, but used in most controls. Change-Id: I404aeab706479d0b666529ebdb09caa6b8085cae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMaterialStyle: cleanup several unused colorsJ-P Nurmi2016-07-211-17/+1
| | | | | | | | | | | | | | | | | | These are no longer used now that the hovered and focused states are visualized by the ripple background, and the pressed state by the ripple waves and the elevation shadow. Change-Id: Ia2d315c2d8b31e4fcd77534f6128584b9daeb8d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: tweak ScrollBar looks and behaviorJ-P Nurmi2016-07-181-0/+2
| | | | | | | | | | | | | | | | | | | | Model the Material style scroll bar after the Chrome OS scroll bar. This adds a hover effect, and makes the transient timeout much longer to make the scroll bars easier to use on desktop. Task-number: QTBUG-50003 Change-Id: I5b1798e6c6b04482eab21d56e48935e2a9c69250 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-011-0/+2
|\| | | | | | | | | | | | | | | | | | | | | Comparing colors in tst_material.qml works fine now. Conflicts: examples/quickcontrols2/gallery/qtquickcontrols2.conf tests/auto/material/data/tst_material.qml Task-number: QTBUG-53556 Change-Id: I59970442a09bd72bf0ce53fe838c560ca8daf325
| * SpinBox: disable up and down indicators when appropriateMitch Curtis2016-05-241-0/+2
| | | | | | | | | | | | Change-Id: I6fbfde582723632c9b955a6e7ee380179b7b6a32 Task-number: QTBUG-53519 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Introduce a 'System' theme to the styles.Friedemann Kleint2016-05-261-1/+2
|/ | | | | | | | | | | | | | | | Setting the theme to System chooses either the light or dark theme based on the system theme colors. However, when reading the value of the theme property, the value is never System, but the actual theme. [ChangeLog][Controls][Material] Added Material.System theme enum value, that can be used to let the Material style choose either the light or dark theme based on the system theme colors. [ChangeLog][Controls][Universal] Added Universal.System theme enum value, that can be used to let the Universal style choose either the light or dark theme based on the system theme colors. Change-Id: Ibfc9f01953cb8322b64d59413cfbaef9d4bb28fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: fix flat button colorsNikita Krupenko2016-05-091-2/+0
| | | | | | | | As 251afe3eaac3367c5c659dddc1e8854f833d5112 changed the way, how button color are retrieved, use it for flat buttons too. Change-Id: I28448c597b027293b1acac22dad586e0e7156707 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: set correct ToolBar foreground color for built-in primariesJ-P Nurmi2016-05-091-0/+2
| | | | | | | | | | When the primary color is one of the predefined values, we can choose the appropriate light or dark foreground color according to: https://www.google.com/design/spec/style/color.html#color-color-palette Change-Id: I2a25211ec3bc091211ce58b809089acaa32cb960 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* Material: use proper shade for light and dark themeNikita Krupenko2016-05-091-0/+1
| | | | | Change-Id: I2c93887890113a0ba37ce967349458c4b296a9ed Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: Add proper elevation supportMichael Spencer2016-05-041-18/+29
| | | | | | | | | | | | - 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>
* Material: add foreground and background attached propertiesJ-P Nurmi2016-04-151-2/+26
| | | | | | | | | | | | This has been a common request on the mailing lists and forums. Users want to customize the text color of various controls without having to replace whole delegates. This change makes it possible to specify both foreground (eg. Button text) and background (eg. ApplicationWindow, Page and Pane background) colors so that they propagate to children in the same way than accent, primary and theme do. Change-Id: Idae52650ed8620beeff7bf4c8263ffdc1f6ef728 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add QQuickMaterialStyle::variantToRgba()J-P Nurmi2016-04-151-0/+1
| | | | | | | Extracted from setAccent() and setPrimary() Change-Id: I2dff1d0f605cc210f6b86b5aa1a1f5ff284b20af Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* 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>
* Controls: rename the C++ module to qtquickcontrols2J-P Nurmi2016-04-131-1/+1
| | | | | Change-Id: I087a39baebc296a340739161874636926adaa56c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Introduce ToolTipJ-P Nurmi2016-03-221-0/+2
| | | | | | Change-Id: I917f7e83219788fc63389773eb07ee39757bed7f Task-number: QTBUG-51003 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename Qt Labs Controls to Qt Quick Controls 2 - build systemMitch Curtis2016-03-181-1/+1
| | | | | | | | | The imports will be done later, as we don't want to change them until the module is releasable (which requires things like selection handles, etc.). Change-Id: I2140cff7058fc3b696e92ca8c0e5e06dca9a7c9c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QQuickStyle to QQuickStyleAttachedJ-P Nurmi2016-03-161-3/+3
| | | | | | | | Make room for a public QQuickStyle class for configuring the style. Task-number: QTBUG-50787 Change-Id: I2a43436dd1815e3acd7e896a5847e41db42af5c4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add SwipeDelegateMitch Curtis2016-03-151-0/+8
| | | | | | | | | | SwipeDelegate presents a view item that can be swiped left or right to expose more options or information. It is used as a delegate in views such as ListView. Change-Id: I7533a2b223f652993b6cee730930ea6dc125c869 Task-number: QTBUG-51610 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-151-0/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4aae04ab8cac381b4a8262a2f47298ca014f4692
| * ItemDelegate: make the highlight visible against any backgroundJ-P Nurmi2016-02-151-0/+2
| | | | | | | | | | | | | | | | | | Use a translucent color for the highlight, so that the exact background color doesn't matter. Change-Id: I63348137dedd04aca8110b8f7610506ca003ec87 Task-number: QTBUG-51118 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-251-0/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore src/templates/qquickcombobox_p.h src/templates/qquickmenu_p.h src/templates/qquickmenu_p_p.h src/templates/qquickoverlay_p.h src/templates/qquickpopup.cpp src/templates/qquickpopup_p.h src/templates/qquickstackview_p.cpp Change-Id: I89c7d518697beec0b81ef3a12205286a4f3ccf89
| * Restore Material::primaryJ-P Nurmi2016-01-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea was that users would simply configure a different accent color for the toolbar, but the only way to do this is in code, which creates a hard dependency to the material style. A separate primary color makes it possible to configure both colors in :/qtlabscontrols.conf, which nicely avoids style specific dependencies. Change-Id: Ia5ad92b57f9aea32e16e9260117e8d32b3356556 Task-number: QTBUG-50329 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | C++11 keywordsJ-P Nurmi2016-01-211-2/+2
|/ | | | | | | | - Q_NULLPTR -> nullptr - Q_DECL_OVERRIDE -> override Change-Id: I8ee65caafd43ab41b6de43835200cac6c8ffa278 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material: add support for user-defined accent colorsJ-P Nurmi2016-01-141-7/+9
| | | | | | Change-Id: Ia88cfcb307d03977c45bff32ad2b1d290d183a57 Task-number: QTBUG-50178 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove unused Material::primaryJ-P Nurmi2015-12-251-14/+0
| | | | | Change-Id: Ied4c732ed9147f6f8f03b7165057e74a17274b7f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material style for MenuJ-P Nurmi2015-12-181-2/+2
| | | | | Change-Id: Ifb00d1ddfc326cf206f6d1ffd93ccbe248eb5a3d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Overlay::background that is shown when any modal popup is openJ-P Nurmi2015-12-151-0/+2
| | | | | Change-Id: Idc2a5bbb5cf7a08ff21731537a378b1dd8050833 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material style: read theme, accent & primary from qtlabscontrols.confJ-P Nurmi2015-12-141-0/+2
| | | | | Change-Id: Ie55978ae9c76789cf7796752ceefd183c063662b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add ComboBoxJ-P Nurmi2015-12-041-0/+2
| | | | | Change-Id: I4cfc2367db92786097a1ce66bd4b5a2f71322a2e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add QQuickStyleJ-P Nurmi2015-12-021-12/+6
| | | | | | | | | Now that we have a good place for it, we can share a common base class for QQuickMaterialStyle and QQuickUniversalStyle. QQuickStyle implements the inheritance pattern for attached styles, in one place. Change-Id: I459d98f96ce7c6de1ce7ef716e859f459278d8ad Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Remove QQuickMaterialStylePrivateJ-P Nurmi2015-11-301-2/+11
| | | | | | | | | This paves the road for QQuickStyle, a common base class for QQuickMaterialStyle and QQuickUniversalStyle. QQuickStyle will be in a static library -> no BC requirements -> no pimpl. Change-Id: Ibac37bef3a9282a3b7aaf29c4de854cab3cd8d7d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Visualize Material Button's highlighted stateMitch Curtis2015-11-231-0/+10
| | | | | | Change-Id: I1c638c0b70a0ba8d0f5cfe1d7e41fd514c38c1c9 Task-number: QTBUG-49551 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Material styleMitch Curtis2015-11-121-0/+214
Change-Id: I93662a53b42858a5b65154c5ede334182e738dde Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>