aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrols2plugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-221-20/+20
| | | | | | | | | | | This reverts commit 950f8bff7cbbdbd472234fd32ef659c9d0e8ba7c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I69e514934864bea3ccd68de9a65fb08e262325a1 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-221-20/+20
| | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtquickcontrols2. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4209 Change-Id: I4175d7a58cb1b04172132a3bc09aea1b065d1778 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-111-0/+4
| | | | | | | | | | [ChangeLog][Controls] Add HorizontalHeaderView and VerticalHeaderView. They are controls associated with TableView. Support flicking synchronization Support default, fusion, imagine, material and universal delegate styles. Fixes: QTPM-1300 Change-Id: Ie3f913dd616cda0d4e5a22a3d95baf71692370fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SplitView: fix revisions, imports and \since versionsMitch Curtis2019-03-071-3/+3
| | | | | | | | Work was probably started before 5.12 but the patch ended up getting merged in time for 5.13. It seems that I forgot to update the versions. Change-Id: I19edf08158cca0967a7a536b3aee326e3b393d4c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-091-0/+8
|\ | | | | | | Change-Id: I8aded0949d38315d4d22fa511f83331d7caf3145
| * Fix font and palette settings in .conf files not being respectedMitch Curtis2019-02-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5.11, the font palette read from the qtquickcontrols2.conf file was respected. After some large architectural changes (around the time of 94780538) required to fix a crash, 5.12 stopped respecting these settings. This patch fixes the issue by setting the default font as the System scope font, because that's what QQuickControlPrivate::parentFont() uses as its fallback if no parent item has a font explicitly set. QQuickControlPrivate::parentFont() is used as the starting point for font inheritance/resolution for each control. The same fix is used for palettes. Change-Id: I706a9f109c9959b8ea6b91f842146dbfc876cb2b Fixes: QTBUG-72023 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-101-2/+18
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
| * Fix incorrect font size in certain styles on WindowsMitch Curtis2019-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a style is loaded, QtQuickControls2Plugin::loadStylePlugins() is called. This function uses QPluginLoader to search the style directory for the style plugin. On Windows, the code was looking for the plugin without the debug "d" suffix, causing the style plugin to fail to load for debug builds. This results in the QQuickTheme subclasses not being created, causing controls to be shown with default font sizes. This patch fixes the issue by appending the "d" suffix on Windows. Change-Id: I706dbe39325a104bcd6ce72cb0a8d37025adb055 Fixes: QTBUG-71902 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add SplitViewMitch Curtis2018-11-131-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SplitView is an important tool for desktop applications that do not want to use a dock widget-style approach for their user interface. It allows users to have some degree of control over the sizing of elements in the UI, as well as the ability to conveniently serialize those sizes so that they're remembered across sessions. The main differences between this and the SplitView in Qt Quick Controls 1 are: - Has its own SplitView attached properties, rather than relying on the Layout attached properties (which required an additional import). - Uses the attached preferredWidth and preferredHeight properties as well as Item's implicitWidth/implicitHeight properties for the preferred size of items, rather than using the width and height properties. - Inherits from Container, so supports most of its API (though some parts of the API, like the currentIndex-related stuff, make no sense for SplitView). - Uses attached SplitHandle properties for the handle delegate to visualize hovered/pressed effects. - Offers convenience API for serializing the user's preferred sizes. [ChangeLog][Controls][SplitView] Introduced SplitView, a control that lays out items horizontally or vertically with a draggable splitter between each item. Task-number: QTBUG-56318 Change-Id: I3da91643ab312eb9ef5b0567da4e758f17747192 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove fixupBaseUrl()J-P Nurmi2018-05-231-10/+1
| | | | | | | | No longer needed since qtdeclarative commit b8a3b901 that fixed QQmlExtensionPlugin::baseUrl() in static builds. Change-Id: I9a3d04730003c97b9d105593677a2cd588a843f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Create and init QQuickTheme from QtQuickControls2PluginJ-P Nurmi2018-05-221-42/+75
| | | | | | | | | | | | | | | 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>
* Add Qt Quick Compiler support for external stylesJ-P Nurmi2018-05-131-0/+52
| | | | | | | | | | | | | | | | | | | | Qt Quick Controls 2 selects its style when the main QtQuick.Controls plugin is loaded. The style selection procedure resolves styled QML files, such as Button.qml and Slider.qml, from the requested style. The problem was that external styles were not able to embed styled QML files into resources, because the external style plugin had not yet been loaded when the style selection was performed. Only after Button.qml & friends had been registered, and an instance was created, those types would import the style (e.g. QtQuick.Controls.Material). This patch solves the problem by manually loading the external style plugin from the main Qt Quick Controls 2 plugin, in order to gain access to its styled QML files in the resources. The name of the style plugin is read from the qmldir file. Change-Id: I5095ca129e909fb48fd106c87946a6ab9ae88931 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickStylePlugin: prepare for Qt Quick CompilerJ-P Nurmi2018-05-121-63/+64
| | | | | | | | | | Don't hardcode the URL (QRC in static vs. FS in dynamic), but make use of QQuickFileSelector so the appropriate URL gets chosen "for free". This way, we can later add Qt Quick Compiler support for the internal QML files, such as CheckIndicator.qml. Change-Id: Ie1c55f3d82fbf92d0116966b354298338ef5ace6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the code to manually initialize resources in static buildsSimon Hausmann2018-04-271-9/+0
| | | | | | | | | After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is not needed anymore. Instead the resource system injects the plugin entry point with a reference to all resources. Change-Id: Ic3fa0827ee6719b0a22f73b48667deb129089a6f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Refactor QQuickStyleSelectorJ-P Nurmi2018-03-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to determine a single base URL based on the import URI of the plugin, and whether built in static mode, provide a list of paths where to lookup styles, in priority order: - requested style path (-style /path/to/style) - QT_QUICK_CONTROLS_STYLE_PATH environment variable - QT_INSTALL_QML/QtQuick/Controls.2/ - qrc://qt-project.org/imports/QtQuick/Controls.2/ Furthermore, provide the requested style name and the fallback style name as a simple list of selectors. The lookup order is: 1) requested style 2) fallback style 3) default style As a result, QQuickStyleSelector implementation is a lot simpler, completely independent of QQuickStyle, and the style lookup works regardless of whether the files are in QRC or on the file system. This allows us to utilize QRC and the Qt Quick Compiler in the future. Note: two data rows in tst_QQuickStyleSelector::select_data() had to be fixed. Not sure how the expected values ended up like that, but as the comments say, "Label.qml exists in the default and fallback styles" and "Button.qml exists in all styles", so it makes no sense to expect that Label.qml or Button.qml is selected from the FallbackStyle when a valid "data" folder is specified. Change-Id: I18dea9fddf8f079e0140b51b567814da0df2802c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-211-0/+7
|\ | | | | | | Change-Id: I6cc3095673bb459acef93e3da8a67c3819b70d3a
| * Reset QQuickStyle when the QtQuick.Controls 2 plugin is unloadedJ-P Nurmi2018-02-201-0/+7
| | | | | | | | | | | | | | | | | | Cleanup global static data in QQuickStyle when the controls plugin is unloaded (qmlClearTypeRegistrations()). This ensures that the style is resolved as appropriate when the controls plugin is reloaded. Change-Id: Icebb835e057e6063e4fc0ca035c6836560bc7c14 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-151-22/+10
|\| | | | | | | Change-Id: Id3333e9bb67ced4c6dbae5845512fe1927a7b858
| * Fix memory leak in QQC2Simon Hausmann2018-02-071-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When repeatedly creating a QQuickView, loading a QML file that imports QQC2 and deleting the view again, we would leak memory that was allocated as a consequence of QML type registration in initializeEngine() callbacks that were called on every iteration. After the limitation of namespacing in the registerTypes() callback of QML module plugins has been lifted, we can move the type registrations into registerTypes() where they belong and which is called only once. Change-Id: I7e314663a69fd8c8529195b56c128b61392c0042 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
* | Read :/qtquickcontrols2.conf in QQuickStylePluginJ-P Nurmi2018-02-151-3/+3
|/ | | | | | | | | | | | | | | | | QQuickTheme is going to be promoted from libQQC2 to libQQT2 so that it can provide dark and light palettes (and later, icons). The first step is to refactor out the :/qtquickcontrols2.conf reading code, which cannot be in style-agnostic libQQT2. Read the conf file in QQuickStyle Plugin instead. The additional benefit is that we don't need duplicate name() methods for styles and their themes. Even though QQuickStyle Plugin's name handling is case-insensitive, QSetting is case-sensitive. Therefore all QQuickStylePlugin::name() overrides have been updated to use capital first letter. This name is used to lookup the correct section in :/qtquickcontrols2.conf. Task-number: QTBUG-63331 Change-Id: I07b1269d9dbc2c9568e6f22f2da75951fde7b669 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-101-1/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/BusyIndicator.qml src/imports/controls/CheckBox.qml src/imports/controls/CheckDelegate.qml src/imports/controls/ComboBox.qml src/imports/controls/DelayButton.qml src/imports/controls/Dial.qml src/imports/controls/ItemDelegate.qml src/imports/controls/MenuItem.qml src/imports/controls/RadioButton.qml src/imports/controls/RadioDelegate.qml src/imports/controls/SwipeDelegate.qml src/imports/controls/Switch.qml src/imports/controls/SwitchDelegate.qml src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc src/imports/controls/material/CheckDelegate.qml src/imports/controls/material/ItemDelegate.qml src/imports/controls/material/MenuItem.qml src/imports/controls/material/RadioDelegate.qml src/imports/controls/material/SwipeDelegate.qml src/imports/controls/material/SwitchDelegate.qml src/imports/controls/qquickdefaultbusyindicator.cpp src/imports/controls/qquickdefaultbusyindicator_p.h src/imports/controls/qtquickcontrols2plugin.cpp src/imports/controls/universal/CheckDelegate.qml src/imports/controls/universal/ItemDelegate.qml src/imports/controls/universal/MenuItem.qml src/imports/controls/universal/RadioDelegate.qml src/imports/controls/universal/SwipeDelegate.qml src/imports/controls/universal/SwitchDelegate.qml src/quickcontrols2/quickcontrols2.pri src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickmenu.cpp src/quicktemplates2/qquickpopup_p.h Change-Id: Ib25c8b4a7fe018b7c0ade9b02bfaaa6980118c15
| * Default: eliminate internal IDs in DelayButtonJ-P Nurmi2017-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An ID in the internal Text element prevented deferred execution for the whole content item. The ID was used for two reasons. First of all, it was used to propagate implicit size from the Text element to the root of the content item. Secondly, it was used to calculate clip areas to provide the same text in two different colors. This patch provides two internal C++ helpers, ItemGroup and ClippedText, that provide these functionalities without the need of using IDs in QML. At the same time we got rid of two wrapper Items and simplified some QML bindings, which results to a nice boost (18->22) in qmlbench on TX1. Task-number: QTBUG-65341 Change-Id: Icf9c09356cf5c0ed641bde537bee7291bd260057 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Make QtQuick.Controls::ButtonGroup a composite typeJ-P Nurmi2017-06-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | This is a backport (only the ButtonGroup part) of 1af7f8a59, which was already pushed to dev. The main motivator for the original patch was to cleanup the registration code, but this fixes also an issue with auto- completion in Qt Creator. Task-number: QTCREATORBUG-18321 Change-Id: I5e8e8122cb94c74f78445cce1a89f604634149b1 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | Visualize mnemonicsJ-P Nurmi2017-11-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately this comes a bit late in the 5.10 cycle, but this should be released together with the rest of the mnemonics stuff going out in 5.10, because it affects the value of AbstractButton/Menu(Bar)Item::text. As the removed TODO comments and altered tests indicate, previously the ampersand was blatantly stripped out. It would be worse to change it later once people have already started using mnemonics and rely on the behavior in custom styles. The necessary modifications to QQuickText were added in qtdeclarative commit 65ef4ba. Task-number: QTBUG-61422 Change-Id: Iaa73da8c012e9a6019743cf98f5bdc02527064e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge SwitchIndicator back to Switch & SwitchDelegateJ-P Nurmi2017-11-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: /home/jpnurmi/Projects/qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 87.8 frames; using samples; MedianAll=87; StdDev=2.16795, CoV=0.0246919 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_switch.qml [...] Average: 92.6 frames; using samples; MedianAll=92; StdDev=2.19089, CoV=0.0236597 Change-Id: Iea9e88e4e771ac27d336c2c87232704d33a226ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge RadioIndicator back to RadioButton & RadioDelegateJ-P Nurmi2017-11-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the previous commit (CheckIndicator) for more details. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 91.6 frames; using samples; MedianAll=91; StdDev=1.51658, CoV=0.0165565 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_radiobutton.qml [...] Average: 95.8 frames; using samples; MedianAll=96; StdDev=2.04939, CoV=0.0213924 Change-Id: Ic185241767d0b9422e86919356e3155e00803e56 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: merge CheckIndicator back to CheckBox & CheckDelegateJ-P Nurmi2017-11-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal CheckIndicator helper was introduced together with CheckDelegate in 1acb34a, because we naturally wanted to share the indicator instead of duplicating it. This change is controversial, because it leads to duplicate code, but keeping the indicator definitions inline is clearly faster. This is not seen as a huge problem for the Default style, because the indicator is not too complicated. Basically, this fixes a ~5% performance regression introduced by 1acb34a. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 72.8 frames; using samples; MedianAll=73; StdDev=1.48324, CoV=0.0203742 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_checkbox.qml [...] Average: 77 frames; using samples; MedianAll=77; StdDev=1.41421, CoV=0.0183664 Change-Id: Ibee0e29e83a64ee4a6a772a90b1784a9c8c715bb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Optimize CheckBox, Switch, and RadioButtonJ-P Nurmi2017-11-021-0/+3
| | | | | | | | | | | | | | | | | | | | Add an internal CheckLabel helper that simply initializes a few QQuickText properties with defaults that are suitable for CheckBox, Switch, and RadioButton. This gives a 10% boost on desktop in debug mode, and a 5% boost on a TX1 in release mode. Change-Id: I82fead9ca22b6aa74f24924d240c924b2a42a912 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Introduce MenuBarJ-P Nurmi2017-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MenuBar is an ordinary Item. It can be located basically anywhere, but the idea is to introduce a new ApplicationWindow::menuBar property in a follow-up commit. Currently the example snippets are using the header property. [ChangeLog][Controls][MenuBar] Introduced a MenuBar control. Task-number: QTBUG-60350 Change-Id: Ie66dc457a3d8edbe8362fab2a591dc49442c95e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add Overlay attached properties and signalsJ-P Nurmi2017-06-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ApplicationWindow] Deprecated the overlay grouped property in favor of the newly introduced Overlay attached properties. [ChangeLog][Controls][Overlay] Introduced Overlay attached properties and signals that supersede the overlay grouped property in Application Window. The Overlay attached type allows providing background dimming for popups without requiring an ApplicationWindow instance. Task-number: QTBUG-61336 Change-Id: I9df11bcb167e7725014d5f058fe24d70da4a10b3 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Expose PaddedRectangle in QtQuick.Controls.impl 2.0J-P Nurmi2017-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | PaddedRectangle was moved from QtQuick.Controls.Material.impl 2.0 to QtQuick.Controls.impl 2.3 in 8290b876b. It seems that the qhours app is using the PaddedRectangle for a custom SpinBox. Importing 2.3 would make Qt 5.10 a hard requirement, so registering PaddedRectangle to QtQuick.Controls.impl 2.0 allows us to fix qhours so that it still works with Qt 5.9 and earlier. It's an internal type, and technically it already was there since 2.0, so this shouldn't matter much. Change-Id: Ie959dc150356fd5624e899eac9e52ca5a183ffe5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add .qml files for the non-visual typesJ-P Nurmi2017-06-021-11/+3
| | | | | | | | | | | | | | | | | | | | | | This makes the registration code in qtquickcontrols2plugin.cpp clean, consistent, and a bit less error-prone. I can't think of anything style specific in Action, ActionGroup, or ButtonGroup, but in theory, this mechanism would allow styles to even specify their own default values for certain properties if they wanted. Change-Id: I57e1c256d442f2383146808d0fe77355717b0ff2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickDefaultThemeJ-P Nurmi2017-05-291-1/+15
| | | | | | | | | | | | | | | | | | The Default style will be changed to use palettes, and it will be also possible to define the default fonts and palettes for any style in the qqc2.conf file, so the Default style needs its own proxy theme. Change-Id: I0262f7a1f783daa62ca4afbdf3c8fe29d989ca36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Plugins: add missing override keywordsJ-P Nurmi2017-05-161-2/+2
| | | | | | | | | | Change-Id: Ic43604fdb601769e93618cac30d839cc524f1394 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Give all styles access to PaddedRectangleJ-P Nurmi2017-05-121-0/+2
| | | | | | | | | | | | | | Promote it from QtQuick.Controls.Material.impl to QtQuick.Controls.impl. Change-Id: I8260ee85b633544f9e76f6419f8aa26b03c500c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Default: rename QQuickDialRing to QQuickDefaultDialJ-P Nurmi2017-05-121-2/+2
| | | | | | | | | | | | | | | | This is consistent with the other existing internal Default style visuals QQuickDefaultBusyIndicator and QQuickDefaultProgressBar. Change-Id: I3a84edfdd6fb8bbd8a040c633c5b6411dd5350d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Make QQuickIcon a value typeJ-P Nurmi2017-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIcon no longer inherits QObject, but becomes a light-weight implicitly shared Q_GADGET-type, that is passed by value the same way fonts and colors are. Before: SUB: OS: Fedora 25 (Workstation Edition) SUB: QPA: xcb SUB: GL_VENDOR: Intel Open Source Technology Center SUB: GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop SUB: GL_VERSION: 3.0 Mesa 13.0.4 SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 110 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: Average: SUB: 109.2 frames; using samples; MedianAll=109; StdDev=0.447214, CoV=0.00409536 After: [...] SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 123 frames SUB: 124 frames SUB: 124 frames SUB: 122 frames SUB: 125 frames SUB: Average: SUB: 123.6 frames; using samples; MedianAll=124; StdDev=1.14018, CoV=0.00922472 Change-Id: I604532204fb94fc0726d0c9b8b6097f9ebc265e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ButtonGroup::exclusiveJ-P Nurmi2017-04-281-0/+1
| | | | | | | | | | | | | | | | [ChangeLog][Controls][ButtonGroup] Added exclusive property to allow creating non-exclusive button groups. Change-Id: Ic2f3f4bac852f03e5c25f9010993d62234a71e0b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ActionGroupJ-P Nurmi2017-04-191-0/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ActionGroup] Introduced ActionGroup, a non-visual group of actions that is mutually exclusive by default. Task-number: QTBUG-50705 Change-Id: Ia33103173441ca8980341b7c94aba0db3264284d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Replace QQuickColorImageProvider with QQuickColorImageJ-P Nurmi2017-04-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that QQuickImage is exported, we can colorize images using a simple QQuickImage subclass instead of using an image provider. The main issue with QQuickColorImageProvider was that it was based on QGuiApplication::devicePixelRatio(). Now each QQuickColorImage handles its device pixel ratio correctly depending on which screen it is on. Even though we now have to use two bindings (color and source) instead of encoding the color to the source, at the same time we can remove the sourceSize bindings that were added as image provider specific high DPI workarounds (ca87ab8). Task-number: QTBUG-58925 Change-Id: Iba14d2afe3bda540189682ba5be7c58d907d88f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ActionJ-P Nurmi2017-04-101-0/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Action] Introduced Action, an abstract user interface action that can have shortcuts and be assigned to buttons. Task-number: QTBUG-50705 Change-Id: I1986cc7ed13cdf428d51ae38cd196a20493fde8b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Rename QQuickDisplayLayout to QQuickIconLabelMitch Curtis2017-04-071-2/+2
| | | | | | | | | | | | | | | | There are some performance improvements planned that require changes to the class, resulting in it no longer being a layout "container". Change-Id: Ie29f2f95eebb64b3b018746f93763fdbe79625f0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | AbstractButton: add support for iconsMitch Curtis2017-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the following properties to AbstractButton: - icon.name - icon.source - icon.width - icon.height - icon.color Derived types implement the behavior behind these properties using the new private IconImage type. [ChangeLog][Controls][AbstractButton] Added support for icons. The following properties are now available for derived types to use: icon.name, icon.source, icon.width, icon.height, icon.color. Task-number: QTBUG-49820 Change-Id: I3b5e4eaac390543deef60883e13539646a6bb060 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add QQuickDisplayLayoutMitch Curtis2017-03-171-0/+2
| | | | | | | | | | | | | | | | | | This class lays out an icon and text in various configurations, depending on the display property. Task-number: QTBUG-49820 Change-Id: I2ace443e6cb134a1032b0b79378abd2179916133 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add private Color singletonMitch Curtis2017-03-161-1/+9
| | | | | | | | | | | | | | This will be used by various styles. Change-Id: I50b22c1fab04e7fd8fb1fe0b74630c721b6f8c6f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add IconImageJ-P Nurmi2017-03-081-0/+4
| | | | | | | | | | | | | | | | This adds an internal helper item that will be used for showing icons on various controls (in follow-up commits). Change-Id: I792b423737023ba663211371f82fedb2b92857bb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-011-0/+6
|\| | | | | | | Change-Id: Ia4c692552e6573b33b2e0f6b43b2a482a78ad970
| * Tumbler requires ListView and PathViewJ-P Nurmi2017-02-021-0/+6
| | | | | | | | | | Change-Id: Ieb40f536cc5d68fdf13075df2c9b3e09d5077de3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickIconMitch Curtis2017-02-091-0/+4
|/ | | | | | | | | | This adds the initial API needed to add support for setting icons on buttons, etc., and is also necessary for action support. Follow up commits will add the actual support for icons. Change-Id: I9ab892aa4fe43210e7b18bed3e0ebcec2edb9c91 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>