aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | 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>
* QQuickStylePlugin: prepare for Qt Quick CompilerJ-P Nurmi2018-05-121-8/+8
| | | | | | | | | | 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>
* QQuickMaterialStyle: init the globals from the pluginMitch Curtis2018-02-191-0/+1
| | | | | Change-Id: I83e754c145becb91cc0fc849434d4843ee24361f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-151-6/+0
|\ | | | | | | Change-Id: Id3333e9bb67ced4c6dbae5845512fe1927a7b858
| * Fix memory leak in QQC2Simon Hausmann2018-02-071-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Give all styles access to PaddedRectangleJ-P Nurmi2017-05-121-1/+0
| | | | | | | Promote it from QtQuick.Controls.Material.impl to QtQuick.Controls.impl. Change-Id: I8260ee85b633544f9e76f6419f8aa26b03c500c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Replace QQuickColorImageProvider with QQuickColorImageJ-P Nurmi2017-04-181-3/+0
| | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextfield.cpp Change-Id: Ie80a2d3bcbb961a38e3dffa247547d3d860c231a
| * Add missing QML type registrationsJ-P Nurmi2017-02-201-0/+1
| | | | | | | | | | | | | | | | For the internal Radio and CheckIndicator types. Task-number: QTBUG-59026 Change-Id: I7e34f29e33ebd3d748892df0ba1592fe8ae5ed44 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>
* | Make sure the appropriate import versions are always availableJ-P Nurmi2016-11-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Utilize the newly introduced qmlRegisterModule() to automatically register the import version that matches the Qt version that is used to build the module. Now we can remove the artificial qmlRegisterRevision() calls, which were added just to make certain import versions available, even if there was no such revision. Change-Id: Ic3887c221c69b6cd299853d8d5869b8af7a314ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: share the CursorDelegateJ-P Nurmi2016-10-281-0/+1
| | | | | | | | | | | | | | | | Duplicate code in TextField, TextArea, and SpinBox. The next one is editable ComboBox. Change-Id: Ibbd054d2f945f4964ee0007f9e9dc8a9450902e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: rewrite the indeterminate progress bar animationJ-P Nurmi2016-10-191-3/+2
| | | | | | | | | | | | | | | | Use a simple animated node instead of using the private animator API. Task-number: QTBUG-56601 Change-Id: I40cf3a8b762c37ce6e93cedf4f77fe53ad457d8f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: rewrite the busy indicator animationJ-P Nurmi2016-10-181-3/+2
|/ | | | | | | | Use a simple animated node instead of using the private animator API. Task-number: QTBUG-56601 Change-Id: I9dc474f75b5c5a6fcd8d11735970c1a354ed5b56 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add ComboBox::flatJ-P Nurmi2016-08-111-0/+3
| | | | | | | | | [ChangeLog][ComboBox] Added a flat property that provides more suitable looks for using ComboBox in a ToolBar. Task-number: QTBUG-54935 Change-Id: Id458a078486aeac5d542a57f3ed247d63d25e95c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Restore version 2.0 for the .impl importsJ-P Nurmi2016-08-101-13/+14
| | | | | | | | | | | It's a bit of extra hassle, but the type registration can be done so that we keep the old version available to avoid deliberately breaking apps that have had to import .impl to gain access to the internal goodies. For example, someone may have made a copy of one of the controls as our documentation suggests. :) Change-Id: I5308d7e74ecebf69da7fe9c6912380f72c3c9a2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add an own copy of RectangularGlow, with OpenGL core and D3D12 as wellLaszlo Agocs2016-07-141-0/+1
| | | | | Change-Id: I0231854ae93cb3f45ea5da13c30c08fdc1b29139 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: implement the ripple effectJ-P Nurmi2016-07-091-0/+2
| | | | | | | | | | | Consequently, the controls that were previously using the old Ripple type have now gained hover effects (when hoverEnabled: true). The rest of the Material style controls will be adjusted to use the ripple effect in follow up commits. Task-number: QTBUG-50003 Change-Id: I436f3794411fe75de9ccbe3ecda71029130db613 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-11/+10
| | | | | | | | | | | | 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>
* Make import version 2.1 available for Material & UniversalJ-P Nurmi2016-06-211-0/+1
| | | | | Change-Id: Ia3ab14fdb67e32907396329ab9034a429c7b536e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/doc/qtlabscontrols.qdocconf src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/material/qtlabsmaterialstyleplugin.cpp src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp src/imports/controls/qtlabscontrolsplugin.cpp src/imports/controls/qtquickcontrols2plugin.cpp src/imports/templates/qtlabstemplatesplugin.cpp src/imports/templates/qtquicktemplates2plugin.cpp Change-Id: I6159e681b77e4a0a293b6bd7fb11a46d58873da0
* 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>
* Fix Q_INIT_RESOURCE() for static buildsJ-P Nurmi2016-04-261-1/+1
| | | | | | Change-Id: Ibf864c5c145065fe13dfb958bc4f5fa6a887a1be Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename the style pluginsJ-P Nurmi2016-04-221-0/+110
Mention controls2 in the plugin names for the sake of consistency and to achieve a clear deployment structure where all plugin names match with their deployment folder. Change-Id: I73cac5eec341f0d2e6ebaadfaa1796808fcb80e5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>