aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
Commit message (Collapse)AuthorAgeFilesLines
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-0255-185/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Ensure all links to 'Qt Quick Controls' lead to controls 2Venugopal Shivashankar2018-10-291-1/+1
| | | | | | | | | | The name of the documentation module is also changed from 'qtquickcontrols2' to 'qtquickcontrols', and this is reflected in other modules' dependencies and licensing source files (qt_attribution.json). Task-number: QTBUG-70333 Change-Id: I2ba308b7eddae3af00dfb49a751cac8527c46bba Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Material: qualify DialogButtonBox enums with "T"Mitch Curtis2018-07-051-1/+1
| | | | | | | | | | | | Otherwise strange things happen to innocent pieces of code: DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole qrc:/qml/main.qml:391:17: Unable to assign [undefined] to int Task-number: QTBUG-69286 Change-Id: I6a3c5810c06e0de38af9e87088f08b3e8bae0459 Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-031-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/Menu.qml src/imports/controls/fusion/Menu.qml src/imports/controls/imagine/Menu.qml src/imports/controls/material/Menu.qml src/imports/controls/universal/Menu.qml Change-Id: I017949e5ac617c1cdeece71204e5aa519776fb39
| * Menu: fix items not being scrollable when using WindowMitch Curtis2018-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | Use Window.window instead of ApplicationWindow.window, as the former will always result in a window regardless of which type of window is in use. Task-number: QTBUG-68858 Change-Id: I3bdb60350d92b13621b0f4db9085bf067b6ff6e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-252-1/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/imagine/TextArea.qml src/imports/controls/imagine/TextField.qml tests/auto/controls/data/tst_tumbler.qml Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
| * TextArea, TextField: use the control's renderType in placeholder textMitch Curtis2018-06-132-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The placeholder text's renderType should cohere to the renderType of the control. This is already the case for font, and sometimes color too. This solution avoids the need to expose a new property. Task-number: QTBUG-68769 Change-Id: I6711aea83b7b8ee27f56b9c905aa4870465e3fd9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Create and init QQuickTheme from QtQuickControls2PluginJ-P Nurmi2018-05-223-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add setters to make getters non-virtualJ-P Nurmi2018-05-222-46/+23
| | | | | | | | | | | | | | | | | | | | 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>
* | Add Qt Quick Compiler support for external stylesJ-P Nurmi2018-05-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-078-74/+49
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickabstractbutton_p_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquickdialog_p_p.h src/quicktemplates2/qquickdialogbuttonbox.cpp src/quicktemplates2/qquickdialogbuttonbox_p_p.h src/quicktemplates2/qquickdrawer.cpp src/quicktemplates2/qquickmenubar.cpp src/quicktemplates2/qquickmenubar_p_p.h src/quicktemplates2/qquickpage.cpp src/quicktemplates2/qquickpage_p_p.h src/quicktemplates2/qquickpane.cpp src/quicktemplates2/qquickpane_p_p.h src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquickrangeslider.cpp src/quicktemplates2/qquickscrollview.cpp src/quicktemplates2/qquickslider.cpp src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquickswipeview.cpp src/quicktemplates2/qquicktabbar.cpp src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h src/quicktemplates2/qquicktheme_p.h Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
| * Styles: use C++11 default member initializationJ-P Nurmi2018-05-048-74/+49
| | | | | | | | | | Change-Id: Ifd7521b8a7bfd7da91808dd00ebdcb59f2ba46dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | TextArea: add support for background insetsJ-P Nurmi2018-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | Same as 5adce042 for QQuickControl. [ChangeLog][Controls][TextArea] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Change-Id: I1e1b3a79a9f477ec7b64ec4c6cc8021bbf48adc0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | TextField: add support for background insetsJ-P Nurmi2018-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Same as 5adce042 for QQuickControl. [ChangeLog][Controls][TextField] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Change-Id: Ic1e4c15fd4b06a58f229b5156668c9a986f7bc3f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add missing implicitBackground{Width|Height} to non-QQuickControlsJ-P Nurmi2018-05-022-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as 5bd9d44b for QQuickControl. [ChangeLog][Controls][Label] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextArea] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextField] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. Change-Id: Idcc2d9af8df086b41c15f352506fd8afdbb2e3e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-282-6/+8
|\| | | | | | | Change-Id: I6d731149b21d02164220f6cdc485d9e4ae31bd13
| * Ensure that CheckIndicator works with MenuItemMitch Curtis2018-04-202-6/+8
| | | | | | | | | | | | | | | | | | | | This was broken in 99b2fbbc90466c79837c7e68ac5d7a15b2f91699. MenuItem doesn't have a checkState property, so we need to check its checked property instead. Change-Id: I3c2f9b27a1fe81c1de3500fad7e7bbe17ce6e02e Reviewed-by: J-P Nurmi <jpnurmi@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>
* | Material: use background insetsJ-P Nurmi2018-04-256-25/+25
| | | | | | | | | | | | | | | | | | | | Allows easily configuring the insets from the outside. Buttons have normally 6px insets, but for example a large Floating Action Button doesn't. Task-number: QTBUG-60156 Change-Id: I49121c5bd588ff83e7ab9032de42a93872e999e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Replace Material.buttonHeight with Material.touchTargetJ-P Nurmi2018-04-2510-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | The visual height of a Material design Button is 36px in the normal variant, and 32px in the dense variant. The Button has 6px vertical insets to gain 48px touch target height. Rename the old buttonHeight property as touchTarget to make room for the visual buttonHeight that is needed when porting Button to use the newly introduced background insets. Change-Id: Ic2932f71ca75a626ff5e9b0ce9930e1b3f24cf00 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Take background insets into accountJ-P Nurmi2018-04-2342-83/+83
| | | | | | | | | | | | Task-number: QTBUG-60156 Change-Id: I11f59a67f5a319ac5a4eae9b8ccea5d16a983de2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Align and cleanup implicit size bindingsJ-P Nurmi2018-04-2020-42/+56
| | | | | | | | | | Change-Id: I9f206c3c750fd648ba8761c574e0be94d32e940f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | BusyIndicator: follow the "standard" implicit size calculation practicesJ-P Nurmi2018-04-191-2/+4
| | | | | | | | | | | | | | | | Even if the default implementation would not have a background, controls should support custom backgrounds that provide an implicit size. Change-Id: I9ceb929cb540b04719cf85343f23ce13d80ea97b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: follow the "standard" implicit size calculation practicesJ-P Nurmi2018-04-191-2/+7
| | | | | | | | | | Change-Id: I94885e777a9c24cbde856f10e9dd258d8a72e9e1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Dial: follow the "standard" implicit size calculation practicesJ-P Nurmi2018-04-191-2/+7
| | | | | | | | | | Change-Id: I9a08ebd646a720707ed70180b68942be378265b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | GroupBox: add implicitLabelWidth|HeightJ-P Nurmi2018-04-191-2/+2
| | | | | | | | | | | | | | | | [ChangeLog][Controls][GroupBox] Added implicitLabelWidth and implicitLabelHeight properties. Change-Id: Ieae54a3b3044b306cd00f45101c6573b5291352d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Dialog: add implicit header and footer size propertiesJ-P Nurmi2018-04-191-6/+6
| | | | | | | | | | | | | | | | [ChangeLog][Controls][Dialog] Added implicitHeaderWidth, implicitHeaderHeight, implicitFooterWidth, and implicitFooterHeight properties. Change-Id: I0435d97cf1b6950d1ecbd5825fed1991549c59e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Page: add implicit header and footer size propertiesJ-P Nurmi2018-04-191-4/+4
| | | | | | | | | | | | | | | | [ChangeLog][Controls][Page] Added implicitHeaderWidth, implicitHeaderHeight, implicitFooterWidth, and implicitFooterHeight properties. Change-Id: Ia6de025767e64dd2b44edafc2e7dfdf9a99e3b5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SpinBox: add up|down.implicitIndicatorWidth|HeightJ-P Nurmi2018-04-181-4/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][SpinBox] Added up.implicitIndicatorWidth, up.implicitIndicatorHeight, down.implicitIndicatorWidth, and down.implicitIndicatorHeight properties. Change-Id: I2cdc4e95f8cc3f0e47ce3b24346781f44809eecd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | RangeSlider: add first|second.implicitHandleWidth|HeightJ-P Nurmi2018-04-181-4/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][RangeSlider] Added first.implicitHandleWidth, first.implicitHandleHeight, second.implicitHandleWidth, and second.implicitHandleHeight properties. Change-Id: Iab68a7a905c4b6515517e3b9eb11c6fd70782764 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Slider: add implicitHandleWidth|HeightJ-P Nurmi2018-04-181-2/+2
| | | | | | | | | | | | | | | | [ChangeLog][Controls][Slider] Added implicitHandleWidth and implicitHandleHeight properties. Change-Id: Id3a67f052a7b234b7eef0e946433e69c3e8add1d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: add implicitIndicatorWidth|HeightJ-P Nurmi2018-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | Basically same as 704625a0 for AbstractButton. [ChangeLog][Controls][ComboBox] Added implicitIndicatorWidth and implicitIndicatorHeight properties. Change-Id: I1bc9da1ee7ea99dc04ca4458baa06702a4612628 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-04-181-3/+3
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/Page.qml src/imports/controls/fusion/Page.qml src/imports/controls/imagine/Page.qml src/imports/controls/material/Page.qml src/imports/controls/universal/Page.qml Change-Id: I5acf99d0d2009151d6daff9420d79cb06909c873
| * Page: fix implicitWidth bindingsJ-P Nurmi2018-04-171-3/+3
| | | | | | | | | | | | | | | | Don't add paddings to header and footer width when choosing the max. Padding affects content, not headers and footers. Change-Id: I92381762f97eab384b18510522bf788abecd8338 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Popup: add implicitBackground|ContentWidth|Height propertiesJ-P Nurmi2018-04-165-14/+14
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Popup] Added implicitBackgroundWidth, implicitBackgroundHeight, implicitContentWidth, and implicitContentHeight properties. Change-Id: I3881b337bbd46b29873e8c00832006eec8b2836a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Qt Forward Merge Bot2018-04-142-3/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-142-3/+5
| |\| | | | | | | | | | Change-Id: Ia5d3c9705e5832df76bb55753dcf38e340afc5b2
| | * Material: fix RadioIndicator disabled statev5.11.0-beta4Mitch Curtis2018-04-101-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-67574 Change-Id: I3ab706c3eb6ad3112ed3f0a7dc37d530a179be6f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Material: fix CheckIndicator disabled stateMitch Curtis2018-04-101-2/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-67573 Change-Id: Iecdc9f6f35f858b962dc9a9e17077a35f56e90dd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Material: give RadioIndicator a disabled stateMitch Curtis2018-04-091-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-67442 Change-Id: I41d8515763ef3af6da463ab9c1549164de3fafa0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | AbstractButton: add implicitIndicatorWidth|HeightJ-P Nurmi2018-04-139-9/+9
|/ / | | | | | | | | | | | | | | [ChangeLog][Controls][AbstractButton] Added implicitIndicatorWidth and implicitIndicatorHeight properties. Change-Id: Ic9459efa76c12ba0df67dae0ffe103b14e011ee6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use implicitContentWidth and implicitContentHeightJ-P Nurmi2018-04-1324-47/+47
| | | | | | | | | | | | | | A simple search'n'replace change without hidden functional changes. Change-Id: I11c76846028665e66dfc6b4359adb33f77cd88ae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use implicitBackgroundWidth and implicitBackgroundHeightJ-P Nurmi2018-04-1234-68/+68
| | | | | | | | | | | | | | A simple search'n'replace change without hidden functional changes. Change-Id: I8e42f8ad30977630005529094eea726efa15a26d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeView: add contentWidth and contentHeightJ-P Nurmi2018-04-101-2/+2
| | | | | | | | | | | | | | | | [ChangeLog][Controls][SwipeView] Added contentWidth and contentHeight properties. Change-Id: I9c37583cb5fcfb1af2d98d5d3753277e17e82608 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | DialogButtonBox: add contentWidth and contentHeightJ-P Nurmi2018-04-101-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to f1f884d3, which mentioned that: This can be fixed properly in dev by providing separate contentWidth and contentHeight properties that cleanly propagate the content size to QML. [ChangeLog][Controls][DialogButtonBox] Added contentWidth and contentHeight properties. Change-Id: I4b53702568c55d666bccb587af9fe8c8eba0b63d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPopupItem: inherit QQuickPaneJ-P Nurmi2018-04-063-9/+0
| | | | | | | | | | Change-Id: Ia32f3004cf540f995344286683d754558369f279 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickControl: update baseline offset automaticallyJ-P Nurmi2018-04-0417-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | ...unless explicitly defined. All buttons repeated the same binding. [ChangeLog][Controls][Control] Unless explicitly specified, baselineOffset is now automatically updated based on the top padding of the control and the baselineOffset of the contentItem. Styles no longer need to specify the baselineOffset in QML. Change-Id: I9c6f61371fee05a06b5dd31b27d8baf9da0bdeeb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-152-14/+15
| | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | Task-number: QTBUG-67062 Change-Id: Id2f821bd41b72f7bce9885295e89c322eb3332f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>