aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Native style: Fix bug in layoutMargins()HEADdevJan Arve Sæther3 hours2-3/+7
| | | | | | | | | | | | | | It should return margin of 0 if style()->subElementRect(XXXLayoutItem) returned an invalid rect. This means that we cannot rely on m_styleItemGeometry.layoutRect blindly. Change-Id: If6b5a40481c8199a63f3446abc9e7dd1c670d181 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Native style: Add ScrollBar on WindowsJan Arve Sæther3 days6-4/+131
| | | | | Change-Id: I82c8cf3e637550cd458ac77f2cc4f6490dc11802 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove qtxmlpatterns from requirementsAssam Boudjelthia4 days1-1/+1
| | | | | | Pick-to: 5.15 Change-Id: I29b52ed46485f5078458a93ca8c7b20d781ee873 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* nativestyle: add missing cmake fieldsRichard Moe Gustavsen4 days1-0/+2
| | | | | | Change-Id: Ic975da18b11fa3e9bc472dcc4c33d6ffcbc90519 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix compiler warnings: don't copy when container returns referencesVolker Hilsheimer4 days1-1/+1
| | | | | Change-Id: If89dcf833f9dbf09f8b3a558ce441dc1c21499ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot5 days1-1/+1
| | | | | Change-Id: I8234ecb694e632d1dd972b777e553571a464aefe Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* CMake: Fix no-widgets buildAlexandru Croitor5 days3-9/+110
| | | | | | Task-number: QTBUG-86053 Change-Id: Ia2e3c3d0164550bb77b73edb3ef8f5e634e09ea7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* QQuickAbstractButton: don't accept key release if we're not pressedMitch Curtis5 days3-1/+125
| | | | | | | | | | | | | A control should have been pressed if it's going to accept a release. This prevents an issue where a menu opened by pressing enter (handled via attached Keys property) would instantly trigger the first menu item. Pick-to: 5.15 5.12 Fixes: QTBUG-83698 Change-Id: I6b1afbb76f37623012472b2b1148b4862c159239 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich5 days1-2/+1
| | | | | | Task-number: QTBUG-87037 Change-Id: Iaf92dd98f616628bf1d6d692847fbdf3138119fe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot5 days1-1/+1
| | | | | Change-Id: I1bec48a6c14f793bf1d68b720d88f31d5ecf1b19 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot6 days1-1/+1
| | | | | Change-Id: I56664328a10eef0f207b664ed1213cbe342d812f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor6 days16-16/+16
| | | | | | Task-number: QTBUG-87661 Change-Id: I0d26db40fdb7bd35c92c8fd970b60ec580acc0e0 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot7 days1-1/+1
| | | | | Change-Id: Ia1147dc4a315b3913f1dd4133aa080e0a56c1315 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Native style/Slider: Fix tickmarks and groove for fractional numbersJan Arve Sæther7 days2-6/+24
| | | | | | | | | In QQuickSlider, this was very noticeable for very short ranges (e.g. a range less than 1). It also caused wrong rendering of the groove on macOS style. Change-Id: I8a88b2e107e543f5b0cef5a7093b94b08ebeb398 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Nativestyle: Slider on WindowsJan Arve Sæther7 days3-29/+51
| | | | | Change-Id: Iab1f01a2cccad21e178aaf13ea21469a5ce98fea Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Native style, macOS: don't draw a background behind the GroupBox labelRichard Moe Gustavsen7 days1-0/+19
| | | | | | | | | | | | | | | On macOS, the controls are semi-transparent. This means that if you use a different color for e.g the window background, all the controls will get a different color too. For this reason, we should avoid drawing a background color for the GroupBox label. And to achieve that, we need to override the default background set from DefaultGroupBox, to use an Item instead of a Rectangle. Change-Id: I60c496c19744763adb2ec683670c4a9c64cc32fa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* nativestyle, ScrollView: don't resize scroll bars according to paddingRichard Moe Gustavsen7 days2-8/+8
| | | | | | | | | | | | | | | | | | | | | Depending on if you see the scroll bars as a part of the contents, the background, or neither, they should respect either padding, insets, or none of them. The styles that use transient scrollbars see them partly as a part of the contents (judging from their implementation), which means that their width and height will respect padding, but their position will not (they will always be glued to the right or the bottom side of the control). Letting width and height be affected by padding doesn't work so well with non-transient scroll bars. In that case the scroll bars should normally be "connected" at the bottom-right edge. So change the code so that the scrollbars ignore padding, and instead use the full width and height of the control. Change-Id: Ifa5a7708a51b3773a63ebdd50781eb3845be4744 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot7 days1-1/+1
| | | | | Change-Id: Id90232eb8e3614901a1cc4c464453da52697982b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add changes file for Qt 5.12.10Antti Kokko7 days1-0/+27
| | | | | | | Change-Id: I2bed937e04ac3f3b955b222572acd462d1e75ff1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 63f73a2aee40f9bec5ef63fdd416877a6737110d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtquickcontrols2v6.0.0-beta1Qt Submodule Update Bot11 days1-1/+1
| | | | | Change-Id: I1a885a9404a808b7eeb16583c459004f44f86aa4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot11 days1-1/+1
| | | | | Change-Id: Icbb8ceb8bdf12fb27591679870896b3d97826f30 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* test, nativestyle: change ScrollView bindingsRichard Moe Gustavsen11 days1-2/+2
| | | | | Change-Id: If805588d7a0a7b1fbacf5e89c0706a1acc98907a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollView: document how you can make ScrollView scroll in only one directionRichard Moe Gustavsen11 days1-1/+7
| | | | | | | | | | | It's not obvious how you can make a ScrollView resize the content size in such a way that you're only allowed to scroll in one direction (taking any scroll bars or padding into account). So add a line the explains how you can do it. Pick-to: 5.15 Change-Id: I2d4594d99eab2390d7a5f24710a7e381dbac4c2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove QtQuick.Window imports from basic styleEskil Abrahamsen Blomfeldt11 days3-3/+0
| | | | | | | | | Window is now part of the main QtQuick import, and the compatibility import does not work with static builds. Change-Id: Ib80f54250902f0728fb57d6d2579f95b3f425956 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot11 days1-1/+1
| | | | | Change-Id: I99909c375c23952a890be301c8800d294adf3abb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* nativestyle, transitionDuration: make property CONSTANTRichard Moe Gustavsen12 days2-3/+2
| | | | | | | | | | | | | | Even if the value of transitionDuration never change, the QML engine will still complain if you use the property in a binding, saying that it's not notifyable. So to silence the engine, make it CONSTANT. Also, in macos/ScrollBar.qml, ensure we actually read the transitionDuration from a styleitem (parent is apparently not). Change-Id: I58e89e8771dd645ecd8a0b75a7e3871845d270be Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* nativestyle, ProgressBar: fix copy/paste mistake related to nativeIndicatorRichard Moe Gustavsen12 days1-1/+1
| | | | | | | | DefaultProgressBar.qml doesn't have any property called "nativeIndicator". Instead it should use "__nativeBackground". Change-Id: I848f82a9e093476cb806ea7fc436238c281591ac Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* nativestyle, ComboBox: remove insetsRichard Moe Gustavsen12 days1-5/+0
| | | | | | | | | | The styleitem no longer has any property called "insets". This was removed a long time ago in favor of layoutRect (which will not affect insets). Change-Id: I460a5062711d03c01fc7de27aea7ac381068b951 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* nativestyle, GroupBox: get groupBoxPadding from the styleitemRichard Moe Gustavsen12 days1-1/+1
| | | | | Change-Id: I58f63b22b97ba985f1e4287f20a65f9759257502 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* nativestyle/ScrollBar: don't show the scrollbar if the policy is AlwaysOffRichard Moe Gustavsen12 days1-1/+1
| | | | | | | | | As it stood, we would always show the scrollbar if its size was less than 1.0. This is wrong, we should only do that if the policy is also "AsNeeded". Change-Id: I516219dc27e0c3ef80e0e7bc2e11b36a8836e22d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollView: always clip implicitly created FlickableRichard Moe Gustavsen12 days3-8/+14
| | | | | | | | | | | | | | We almost always want to clip the flickable so that flickable contents doesn't show up outside the scrollview. The only time this is not really needed, is when the scrollview covers the whole window and the scrollbars are transient. But for that corner case, if this optimization is needed, the user can simply create his own flickable child inside the scrollview, and control clipping on it explicit. [ChangeLog][ScrollView] ScrollView now clips its contents by default. Change-Id: I44bd7a8c397b90e14d0b9d5db8ec6523da205648 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* macOS/ScrollView: don't create contentItem too earlyRichard Moe Gustavsen12 days1-5/+0
| | | | | | | | | | | | | | When creating the binding "contentItem.clip:" we accidentally also created the contentItem before the component was completed. Since the contentItem of a ScrollView is a Flickable, it meant that we ended up always creating an internal flickable from QQuickScrollViewPrivate::ensureFlickable, instead of using the Flickable child if there was one. So this binding cannot be used. Change-Id: I2e7ca63f64693adb1b524966fec82aef2b3fb658 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot13 days1-1/+1
| | | | | Change-Id: I295f8677a1e0f13312acee9021ea862afb483435 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot13 days1-4/+1
| | | | | Change-Id: I1a06b5eae19367c5f44e5b4a002c4501dc470b5e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Have templates depend on QtQuickUlf Hermann14 days3-0/+5
| | | | | | | | | | | | Templates defines a number of C++-based QML types, most of those are derived from QQuickItem. Therefore, it actually needs QtQuick although it never explicitly imports QtQuick. In order for tools to figure that out, declare the QtQuick dependency in the qmldir file. Task-number: QTBUG-87164 Change-Id: I982b4ee57102ac62b0ee6e8559e34c5e203a7a0f Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add optional imports for all the styles to controls/qmldirUlf Hermann14 days3-0/+23
| | | | | | | | This allows qmllint to find them. Change-Id: I33b8ad4b2a736d914e7522761c2e574e482b9460 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Be consistent with data tags in tst_styleimportsMitch Curtis2020-10-121-10/+10
| | | | | Change-Id: I3042ad7543eefa3153db0e9eee1ae9186f7011d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix tst_StyleImports::selectMitch Curtis2020-10-121-9/+9
| | | | | | | | | | | | | 8b534487044dfb3b464431ecb91ef4e0864af4ed made it so that the most appropriate built-in style is chosen by default is no style is specified. This breaks tests that assume the old behavior is still in place. Fix those tests to explicitly set the Basic style. Task-number: QTBUG-86403 Change-Id: I6a51611741e2d0cb9109bb0221c2214a5c5179df Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Native style, macOS: add scrollviewcornerRichard Moe Gustavsen2020-10-124-0/+188
| | | | | | | | | | | | | On macOS (Big Sur), when a ScrollView has both a vertical and a horizontal scrollbar, we should draw a corner item between them so that they look 'connected'. Since we don't have a way to draw that item using QStyle, we simply grab a section of the center of a ScrollBar groove, and use that to create a corner item. Change-Id: I4e4df25b6769e810e6b046f6842f4424450fecb3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style, macOS: always draw a TextField using NSTextFieldRichard Moe Gustavsen2020-10-121-30/+1
| | | | | | | | | | | | | There is no apparent reason as to why we should let QCommonStyle fill the background before it calls PE_FrameLineEdit in QMacStyle. The NSTextField cell already draws the correct background, which is supposede to be semi-transparent in dark-mode. Therefore, just let PE_PanelLineEdit and PE_FrameLineEdit be drawn the same way. Change-Id: Iacd4f1b1802e1b0c2b96a92cf271b681c10b8cff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style: add a function imageSize() rather than overriding minimumSizeRichard Moe Gustavsen2020-10-122-9/+14
| | | | | | | | | | | When not using nine patch scaling, we used to override minimumSize to instead be the actual size of the item, since we use minimumSize to also be the size of the image we draw. But this turns out to be confusing, especially while debugging. So introduce a more explicit imageSize() function instead, and leave minimumSize unchanged. Change-Id: I8d3ec25603d430a94b124713fad01bf6d277bbe5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update QStringConverter usageMårten Nordheim2020-10-091-1/+1
| | | | | | | | Following fa8d021fa6fcb040fb702b6ffd2deee52a3b748a Change-Id: Ifa08b5e1bceecb8657ce528eb315c19fa34a1e1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-10-091-2/+2
| | | | | Change-Id: Ic281c99f5679a20a65216b98db4c6cb2bc5cbf8c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Native style: ensure ScrollView contents doesn't go under the scrollbarsRichard Moe Gustavsen2020-10-095-5/+9
| | | | | | | | | On macOS the scrollbars are not transient. The contentItem of a ScrollView should therefore be aligned to the side of the scrollbars, rather than to the side of the ScrollView. Change-Id: Ie58753d61c04c979270995deb6e3b2650fa643db Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style, macOS: clip content view when ScrollView is clippedRichard Moe Gustavsen2020-10-091-0/+5
| | | | | | | | | | | | | On macOS, if a ScrollView has a clip set, we should clip the contentItem as well. This because the scrollbars are semi-transparent and non-transient (doesn't float on top), and in that case, the contents will show through them. So we assume that if the user sets a clip on the ScrollView, he want's to make sure that the contents is not showing outside the area where the contents are supposed to be. Change-Id: I7fff89843c0db38ec1caa6d18464e964788743c1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix static buildEskil Abrahamsen Blomfeldt2020-10-0916-1/+52
| | | | | | | | The register_types() function was optimized away by the linker and the imports would not be found. Change-Id: I3d98602daf78996399630b7b1296cc5dc0d3da05 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typo in Fusion impl's qmldirMitch Curtis2020-10-092-2/+2
| | | | | | | | | | This led to the following error: qtbug86891_qml_plugin_import.cpp:7: undefined reference to `qt_static_plugin_QtQuickControls2FusionStyleImpPlugin()' Change-Id: I5ec6b5c47215944281ce570dcb70a89e1afe72d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Only add a shortcut if the sequence is not emptyAndy Shaw2020-10-081-2/+6
| | | | | | | | | If the sequence is empty then reset m_shortcutId to -1 so it does not have a shortcut attached to it. Change-Id: I16945950145d9d3ca7da73e998b28d64997501d0 Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Disable usage of CMake API compatibility wrappersAlexandru Croitor2020-10-071-0/+5
| | | | | | | | | Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable in the project ensures we ported away from old API calls. Task-number: QTBUG-86815 Change-Id: I3ca1422448dbcadfdb3ed668ba4cfcddcb2d5b7e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-0771-168/+211
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I4a690095fcd4b1141550de86b6820ae2dd579429 Reviewed-by: Cristian Adam <cristian.adam@qt.io>