aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Native style: add separate Info debug flagRichard Moe Gustavsen2020-11-022-19/+23
| | | | | | | | | | | | | | | Add an extra debug flag that lets us distinguish between general information, like geometry info, and explicit debug statements. E.g when writing: qqc2Debug() << "entering this block" ...you sometimes only want to print that line, and not all the additional "noise" you also get if this would print out general information. Change-Id: I86f60557f7c9b08e24c3de55bd0d526e095c6104 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix deprecation warnings related to QIcon::pixmap()Friedemann Kleint2020-11-021-27/+37
| | | | | Change-Id: I5eb7441ce557773e5253d3ce623be637819bab0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix deprecation warnings related to QMetaTypeFriedemann Kleint2020-11-025-8/+8
| | | | | Change-Id: I4e6c1b03915c33f6225c0fb7f86e6acb7715cd4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* nativestyle: refactor many functions to be constRichard Moe Gustavsen2020-11-0228-102/+102
| | | | | | | | Many of the virtual functions should be const, as they should not modify the state of the item. Change-Id: I94a7f9ae56204c8f8f737911e15d81f82d8add83 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add includes to fix build errors in tests and examplesVolker Hilsheimer2020-10-313-2/+3
| | | | | Change-Id: I47dcf16b1d207317985e303c626a121aa307704c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix flatstyle exampleMitch Curtis2020-10-306-6/+13
| | | | | | | | | Styles must now be proper QML modules; i.e. have a qmldir and be available in the import path. Fixes: QTBUG-87848 Change-Id: I07de491be31a24f2b07f68f389600450dc89561c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* manual test, nativestyle: add vertical slider with tick marks on both sidesRichard Moe Gustavsen2020-10-301-1/+11
| | | | | | | | Show an example of having tick marks on both side of a slider. This API is currently private. Change-Id: I1a458754aff40b60b16dce5aac2fa41789eeae69 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* macOS: draw the handle as a part of the backgroundRichard Moe Gustavsen2020-10-302-1/+30
| | | | | | | | | | | | | | | | In dark mode, the slider handle is semi-transparent. If we draw the handle and the groove separately like we do today, the handle will end up _on top of_ the groove rather than as a part of it. The result is that you will see the groove behind the handle, which is wrong. Since we already draw the groove with tick marks without using a nine-patch image, we might as well draw the handle at the same time. This will give us the correct appearance. Change-Id: Ie582f99450c824d6955e3c0783dad89ab41160ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* macOS: clean up slider qstyle implementationRichard Moe Gustavsen2020-10-301-81/+31
| | | | | | | | | | | | | | | | | | | | | The current implementation doesn't work if drawing the groove and the handle together. The reason is that we transformed the CGContext as a way to flip the groove when drawing the slider in inverted (upside down) mode, which would also affect the position of the handle. Since we don't have an inverted API in Slider, we can simplify the code greatly in QStyle and remove all the transformation code. If we are to support inverted mode in the future, this can be achieved much easier by simply setting the scale on the Slider (or the style item) to -1. We also change the way we draw tick marks on both sides of the slider to use the API in NSSliderCell directly rather than manipulating the CGContext. Change-Id: I882a9e7eb69944da590d9d6b5ffb85c1f960cdaf Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* CMake: Update usage of add_qt_gui_executableAlexandru Croitor2020-10-291-1/+1
| | | | | Change-Id: I0e5eb05c60fafcf95db5e60ccbd1fee8e50da890 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Native style/Button: Avoid that the label gets elidedJan Arve Sæther2020-10-291-1/+1
| | | | | | | | | | | | | This was observed on Button on Windows style, where the labels size hint was a fractional number (e.g. 38.26). This got truncated by QQuickStyleItem::contentSize(), which caused the content item to get less space than it actually needed It was only observed on Button, but it was likely to also happen with other control types. Change-Id: I50b98fa7d54e5be2cedeeaf60018367689f168cf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Change terminology to "look and feel"Jerome Pasion2020-10-293-4/+4
| | | | | | | | -should be "look and feel" Task-number: QTBUG-88010 Change-Id: I8fa72334a7fb0aab7e057422364966055ac39584 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QuickStyleItem: refactor updatePaintNode()Richard Moe Gustavsen2020-10-291-20/+23
| | | | | | | | | Refactor the padding part, since there is no reason to go through all the if-tests if we don't use nine patch image scaling. Change-Id: If89c13aec0e6de955f032145ee325974c7169d6c Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Regenerate CMake project filesMitch Curtis2020-10-289-0/+16
| | | | | Change-Id: I7f1fe2b07a6c22f02802b0fdc31917b398cbd770 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Update slider metrics by explicitly asking it to layoutRichard Moe Gustavsen2020-10-281-33/+4
| | | | | | | Cherry-picked from qtbase:873579d1579 Change-Id: Icb9ba3cabe9d5bd6670a6e4659701d06ff048d13 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* macOS: Don't assume NSSlider is never flippedRichard Moe Gustavsen2020-10-281-7/+7
| | | | | | | Cherry-picked from qtbase:6f850c080aac36 Change-Id: Ib6fd2ffa918a8bd5c4e7f0a3198eff36b3298f6d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* macOS: stop using the deprecated APIRichard Moe Gustavsen2020-10-281-3/+0
| | | | | | Change-Id: If1481afbfbc2e655e2b09a232abb16aa2dd792fe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* nativestyle: only draw the control if the control is visibleRichard Moe Gustavsen2020-10-282-1/+16
| | | | | | | | Check if the control is visible before taking the time to draw the image. Change-Id: Icb64b85355e1341279a95e9035ae18d91c14d6a8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickStyleItem: add proper constructorRichard Moe Gustavsen2020-10-282-2/+3
| | | | | | | | | QQuickStyleItem has been missing a proper constructor that calls the constructur of the base class. This patch will add one. Change-Id: I7ba16b84a548bf8674723aa0d569b929111d07cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add changes file for Qt 5.15.2Antti Kokko2020-10-281-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | - 6822a725cffd20a21475c57d7195465c59f5903b tst_qquickpopup: fix setOverlayParentToNull test - 2abdd399bf359e2459e4ae7c6456736087aa1c32 Add changes file for Qt 5.15.1 + 1740afc07950fb0ae3aca0aad2534191805ff672 Material: fix binding loops when binding between attached properties + 454ca2f441ae3d400255471a7ebe850c6779ad0e Update the text when the inputted value is out of range + 50f3c1b5551228d932f302a06580c70a3a77c336 Unregister the accessible observer before deleting the private object + 59aaf903cc54a7cfba00ec3859ca59292f4cbf4a Allow the preparation of the exit transition even if it did have focus + 1e8d3ffa5fb95699d18af5639ffeb90054b71856 Don't trigger a close due to a release if we did not get a press + f2c5b91201bd3df8de9f47fe71a9d0f2f5b76882 Bump version + 68a916d8ec4ff964bb1310b4065494e9e041499e QQuickMenu: fix contentModel memory leak + 43c9cc30a26f7fb482248115eec418128a1add0f QQuickMenu: fix heap-use-after-free + b6280dd207746f32092f5cb2b55b8c5f8ffa44b9 Add setAcceptTouchEvents() in controls that handle touch events + 88bdce23e260cce2d3a163997d9032c3e6fac858 Specify the QtQuick dependency of templates also in qmldir + 51a57c7ea852151235b692475f08915edb16bb90 Only add a shortcut if the sequence is not empty + c9e58c2168450fd3b1fe3aca3dd143d5fd0db8c5 ScrollView: document how you can make ScrollView scroll in only one direction + a1b0f708e6a22297bdd8af2cf8c461de5da7a16e Add changes file for Qt 5.12.10 + 1a3d27b017fae0471a82870b28e1e808bc2aac33 QQuickAbstractButton: don't accept key release if we're not pressed + a0899012f44806957d0254c8e76cca97adb624f6 Remove qtxmlpatterns from requirements Change-Id: Ic01c73f9d43154a59a41589d4eea185d072cc9f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 16f27dfa3588c2bf377568ce00bf534af48c9558) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* nativestyle, slider: ensure that we set correct slider positionRichard Moe Gustavsen2020-10-271-2/+1
| | | | | | | | | | slider.position is a number between 0 and 1. And when the position is 1, styleOption.sliderPosition should be equal to styleOption.maximum. So no reason to subtract "min" (which is also not a normalized number). Change-Id: I9f9ff2e112e224b3aa32bda12aa1963a6e74c6ca Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Native style: Add ComboBox for WindowsJan Arve Sæther2020-10-273-36/+150
| | | | | Change-Id: I59f64b3941bd0744bba6f6079b9ab3fc30063447 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Text color should not be bright when highlighted on WindowsJan Arve Sæther2020-10-271-2/+1
| | | | | Change-Id: I863764d6b3f957a92551d1cd51f2e69e980db9d3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-2616-0/+64
| | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Change-Id: I1113701f04a16b05b03fbb1a49f131c84659cdcb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Native style: Fix bug in layoutMargins()Jan Arve Sæther2020-10-262-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æther2020-10-236-4/+131
| | | | | Change-Id: I82c8cf3e637550cd458ac77f2cc4f6490dc11802 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove qtxmlpatterns from requirementsAssam Boudjelthia2020-10-221-1/+1
| | | | | | Pick-to: 5.15 Change-Id: I29b52ed46485f5078458a93ca8c7b20d781ee873 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* nativestyle: add missing cmake fieldsRichard Moe Gustavsen2020-10-221-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 Hilsheimer2020-10-221-1/+1
| | | | | Change-Id: If89dcf833f9dbf09f8b3a558ce441dc1c21499ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-10-221-1/+1
| | | | | Change-Id: I8234ecb694e632d1dd972b777e553571a464aefe Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* CMake: Fix no-widgets buildAlexandru Croitor2020-10-213-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 Curtis2020-10-213-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 Heimrich2020-10-211-2/+1
| | | | | | Task-number: QTBUG-87037 Change-Id: Iaf92dd98f616628bf1d6d692847fbdf3138119fe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtquickcontrols2v6.0.0-beta2Qt Submodule Update Bot2020-10-211-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 Bot2020-10-201-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 Croitor2020-10-2016-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 Bot2020-10-201-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æther2020-10-192-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æther2020-10-193-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 Gustavsen2020-10-191-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 Gustavsen2020-10-192-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 Bot2020-10-191-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 Kokko2020-10-191-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 Bot2020-10-161-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 Bot2020-10-151-1/+1
| | | | | Change-Id: Icbb8ceb8bdf12fb27591679870896b3d97826f30 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* test, nativestyle: change ScrollView bindingsRichard Moe Gustavsen2020-10-151-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 Gustavsen2020-10-151-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 Blomfeldt2020-10-153-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 Bot2020-10-151-1/+1
| | | | | Change-Id: I99909c375c23952a890be301c8800d294adf3abb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* nativestyle, transitionDuration: make property CONSTANTRichard Moe Gustavsen2020-10-142-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>