aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/palette
Commit message (Collapse)AuthorAgeFilesLines
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-0215-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Create and init QQuickTheme from QtQuickControls2PluginJ-P Nurmi2018-05-221-1/+1
| | | | | | | | | | | | | | | Instead of creating and setting the QQuickTheme instance from each style plugin (e.g. QtQuickControls2MaterialStylePlugin), create the QQuickTheme instance in QtQuickControls2Plugin when the style is being resolved, and just pass the instance to be initialized by the style plugin(s). This avoids the problem that QQuickTheme API was virtual, and sub-classes created from plugins would have vtables destroyed before the QQuickTheme was destroyed. Task-number: QTBUG-67062 Task-number: QTBUG-68087 Change-Id: I19e9ced5296b708c2668c30163389cb3da6be7cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-221-3/+3
| | | | | | | We don't have the conflicting virtual getters anymore. Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: add setters to make getters non-virtualJ-P Nurmi2018-05-221-12/+2
| | | | | | | | | | This allows us to add more themable attributes (on the side of fonts and palettes) after the QQuickTheme API has been made public, because it won't require adding virtuals. Only the resolve() method is virtual. Task-number: QTBUG-67062 Change-Id: I6a5cc8d15aeaa5a9a0fe9b6d2591077f8822daac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename QQuickTheme::current to instanceJ-P Nurmi2018-05-161-2/+2
| | | | | | | | Avoid giving a wrong impression that the theme instance could be changed on the fly. Change-Id: Ifb5078422385d2f15da6a416d89cc9d6f46b0f40 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-55/+57
| | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: cleanup the APIJ-P Nurmi2018-03-151-1/+1
| | | | | | Task-number: QTBUG-67062 Change-Id: Id2f821bd41b72f7bce9885295e89c322eb3332f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: add missing fonts and palettesJ-P Nurmi2018-03-151-3/+3
| | | | | | | | | SpinBox, Switch, and Tumbler were previously not available in QPlatformTheme, but now we have our own enums so we can add them. Task-number: QTBUG-67062 Change-Id: Ie99a49b464fbbd25051181b75d721f537b8e3a68 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Sync tst_palette::defaultPalette() with tst_font::defaultFont()J-P Nurmi2018-03-141-50/+6
| | | | | | | Iterate and fill the whole test palette array. Change-Id: Ibaf2365fc7c0d10dbea0747ae3351e3523869da3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: don't inherit QPlatformThemeJ-P Nurmi2018-02-271-9/+5
| | | | | | | | | | | | | | | | Use QPlatformTheme as a fallback instead of inheriting from it. This way, Qt Quick Controls 2 themes don't mess up the fonts and palettes of Qt Quick Controls 1 and Qt Widgets applications. Note: QQuickTheme::Font and QQuickTheme::Palette enums are copies of the respective enums in QPlatformTheme, for now. This is the simplest first step, but later on, we can have our own set of enums that cover controls, such as Switch, that were previously entirely missing from QPlatformTheme. Task-number: QTBUG-51921 Change-Id: I8efe0ba2d03d65bc12b55b533ba9f2fab5320348 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tests: cleanup QPlatformTheme referencesJ-P Nurmi2018-02-151-64/+63
| | | | | Change-Id: I061f99250ea462b002444de33bc0ae0d80dbf4d5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move QQuickControlPrivate::themeFont|Palette() to QQuickThemeJ-P Nurmi2018-02-151-3/+3
| | | | | | | | | | | | | | QPlatformTheme is too limited for our theming purposes. We need support for separate palettes (and later, icon colors) in dark and light themes. Also, the fact that Qt Quick Controls 2 injects a platform proxy theme does have undesired side effects in Qt Widgets and Qt Quick Controls 1. Therefore, we start separating QPlatformTheme and QQuickTheme. The first step is to eliminate some direct QPlatformTheme access in QQuickControl and route it via QQuickTheme instead. Task-number: QTBUG-51921 Change-Id: I055471a75ed6f26968796496efd1892975447c98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Promote QQuick(Proxy)Theme from libQQC2 to libQQT2J-P Nurmi2018-02-151-1/+1
| | | | | | | | | | QQuickTheme needs to be part of libQtQuickTemplates to be able to provide dark and light palettes (and later, icons). Task-number: QTBUG-63331 Change-Id: If7d3d279a07b6daf6701a1d3cd3686bec1d094b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix tst_paletteJ-P Nurmi2017-09-221-2/+18
| | | | | | | | | | | | | The Default is being ported to use palettes. tst_palette starts failing as soon as QQuickDefaultTheme::palette() returns a custom palette, because the expected palette in tst_palette's comparison was the default platform palette, not the default style palette. First of all, the expected palette was constructed before any QtQuick Controls were imported. Secondly, it was not queried from the platform theme as appropriate. Change-Id: Ia28872fb2769c6cd5ff0159077769951def17f43 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Extend tst_paletteJ-P Nurmi2017-09-112-0/+123
| | | | | | | | | | The inheritance issue was first fixed for fonts in 5.9 (d3aef72) and then the merge commit (c32c776) fixed it for palettes too. This patch just adds the respective test case for palettes. Task-number: QTBUG-63119 Change-Id: I21d18f140878a72ee889d868c79b4694ab28431c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Bump QtQuick 2.9 imports to 2.10Mitch Curtis2017-09-0614-14/+14
| | | | | Change-Id: I274146911cd8a204fcbf439da9259b0a38c8092e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add Imagine styleJ-P Nurmi2017-07-311-1/+1
| | | | | | | | | | | | | The Imagine style is based on image assets. The style comes with a default set of images, but the images can be easily changed by providing a directory with images using a predefined naming convention. [ChangeLog][Controls] Added the Imagine style, which is based on image assets that can be provided using a predefined naming convention. Task-number: QTPM-517 Change-Id: I550d7dac9a9686d60bec15655ac92dea9f36149c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix palette inheritance for popupsJ-P Nurmi2017-06-237-0/+461
| | | | | | | | 9b20157 fixed font inheritence for popups in 5.9. This commit applies the same logic for palettes, and adds the same inheritance tests. Change-Id: Ib286ddcb9fc7ac4fb681d440c76d728dd07cb983 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add support for configurable palettesJ-P Nurmi2017-06-023-9/+24
| | | | | | | | | | | | | | | | | | | A style's default palette is specified in qtquickcontrols2.conf in a "Palette" group under the style's section. QSettings supports the following two alternative syntaxes: [Fusion] Palette\Window=#dedede Palette\WindowText=#212121 or [Fusion\Palette] Window=#dedede WindowText=#212121 Change-Id: I01bf44d9e332064e955e95f619de634fcb79f010 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Cleanup whitespaceJ-P Nurmi2017-05-271-1/+1
| | | | | Change-Id: I453ec5ac798bb5904495b82c6e0e06c40b3a9a70 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Implement defaultPalette()J-P Nurmi2017-05-262-1/+151
| | | | | Change-Id: I4345f6a3b61476287b6161d89b752735757f3a7e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add support for propagating palettesJ-P Nurmi2017-05-2610-0/+731
Change-Id: Icd965d8a79f022f4375e2134621cbc3897014015 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>