aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/fusion
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projectswip/cmakeAlexandru Croitor2020-03-171-0/+164
| | | | | | Change-Id: Ifd6b2289de6465a010f5f2a32789221767b4d5be Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-175-9/+164
|\ | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-104-2/+156
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: Ifc09ea9f71fdba119fe8eed99f0bdcb402444f27
| | * HeaderView: set implicitSize on the style itemsv5.15.0-beta2Richard Moe Gustavsen2020-03-102-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting an implicit size, the user don't need to set a width or height on a HeaderView himself, but it will get the default size recommended by the style. By doing it the way it's done in the patch we achieve the following: 1. A HeaderView will by default be resized to be the same size as the delegate. 2. If the application sets a size on HeaderView it that is larger than the implicit size of the delegate, the delegate will be resized to have the same size (effectively filling out the free space in the header). 3. If the size of HeaderView is smaller than the implicit size of the delegate, the delegate will simply be clipped. (effectivly saying that the implicitSize of the delegate is also it's minimum size). If this is not acceptable for the application, it will need to use a custom delegate. Since a HeaderView delegate is a component and not an item, it should not be a part of the sanity checks we do to avoid using internal IDs. Hence we blacklist until we have a better way of handling such cases. Task-number: QTPM-1300 Change-Id: I30ca3e13ce5e1371b60f5c4ecf742a7d7e794a36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-221-1/+1
| | |\ | | | | | | | | | | | | Change-Id: Iff02839c8ace49582750e06fa1ea9c559f6c93fe
| | | * clang-tidy: fix bugprone-integer-divisionMitch Curtis2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An example of one of the warnings: qquickfusiondial.cpp:87:15: warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division] Change-Id: I9d225e8149935a8f8dde6e8b0657c1406676b7f1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | Make Fusion style header views look more fusionyMitch Curtis2020-02-122-4/+24
| | | | | | | | | | | | | | | | | | | | Change-Id: I659f177ed721b16db7342f37d47d9c062ba2ef97 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-113-1/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-141-7/+8
| |\| | | | | | | | | | | | | | Change-Id: I53a6326a91c2de5a6016df7322df4a6159f2330e
| | * | ComboBox: add selectTextByMouse propertyMitch Curtis2019-12-121-7/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows configuring the selectByMouse property of the underlying TextField for editable combo boxes. Named selectTextByMouse instead of selectByMouse to avoid confusion with selection of the items themselves. [ChangeLog][Controls][ComboBox] Added selectTextByMouse property. Change-Id: I852e4cd44ebe6b2a1ed2535513ea2fc35cbe0a32 Fixes: QTBUG-71406 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-2514-2/+202
|\| | | | | | | | | | | Change-Id: I61919fabd4a3a07ed374f2c3c1fae2d589d6e124
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-231-1/+1
| |\| | | | | | | | | | Change-Id: I65b34cc9ac31ecf2b768ec8e45ac635df7e9cba4
| | * Make ToolTips wrapMitch Curtis2019-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise the text will go outside the window. Change-Id: I3d50a195b1ee6c9b5d49952ef6c49d17c61372fa Fixes: QTBUG-62350 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-1612-0/+0
| |\| | | | | | | | | | Change-Id: I647fa31fafdaea46c341c515f97b7f793ddf4b31
| | * Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-0512-0/+0
| | |\ | | | | | | | | | | | | Change-Id: I4b970036bdb5d312b0dc5cb1bcbd8e161e3d4c7e
| | | * Run optipng on all imagesMitch Curtis2019-11-0412-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find . -name "*.png" -exec optipng -o 7 -strip all {} \; Change-Id: I2238b2dd38813d33ed48d79817f872f922cfa28d Fixes: QTBUG-79275 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-021-1/+201
| |\| | | | | | | | | | | | | | Change-Id: I89a29c7040e233314885eb37731f53dba8ed6c1a
| | * | Update plugins.qmltypes for 5.14Kai Koehne2019-10-211-1/+201
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: I0e421232f4335a7a351562f23134eccdd0b1c674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Regenerate projects to be in syncAlexandru Croitor2019-11-152-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3a57449c9025e22414b8337fcffdeb0f4d769af2 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Update QtQuickControls2 project filesLeander Beernaert2019-10-082-79/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-run pro2cmake on all the project files. Change-Id: I8d349cf34d6cc8e26c76193d9ef220fa85b16bb8 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-152-6/+2
|\| | | | | | | | | | | | | | | Change-Id: I62feb82fcf389bf83c92f83e2ed1a6783d3179ba
| * | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-08-111-4/+0
| |\| | | | | | | | | | | | | | Change-Id: I7c03e9e5227899188d4e16467f692419dc9e9c5b
| | * | Remove redundant codeVitaly Fanaskov2019-07-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: 1) Qt::TexturePattern has never set by any code (this branch is unreachable); 2) There is no knowleage about any brushes in QML (this method is supposed to be invoked from QML only). Palette is used for colors only; 3) Even if brush style has been set somehow, it will be erased during palettes resolving process after assigning a new "window color". Looks like this code was copied from widgets styling and has been compiling only because of the current design. In light of redesigning palette class this code also makes no sense. Bringing knowledge about brushes and its styles to QML requires additional job. Change-Id: I555d062335593ad945b024136750dcd548cd9f16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
| * | | Fix Qt6 buildAlexandru Croitor2019-08-051-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: I0ef33024ead0f7b4782023e34ce1232ba987e62a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Fix build after resent add_qml_module and add_qt_resource API changesSimon Hausmann2019-08-091-3/+0
| | | | | | | | | | | | | | | | | | | | | Re-generate the files. Change-Id: Iba8ab6f3701b8a5c8b26e34ce98845a8da22a9e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Initial CMake conversion for QtQuickControls2Leander Beernaert2019-08-061-0/+129
|/ / | | | | | | | | | | | | | | The CMake setup only covers everything under the src directory. Tests and examples will follow in separate patches. Change-Id: Ic4dbf6efa3128d0eea3af99117ba87690cb51077 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Qualify unqualified id lookup in controlsFabian Kosmale2019-06-1115-49/+49
| | | | | | | | | | | | | | | | | | This is a preparation for https://codereview.qt-project.org/c/qt/qtdeclarative/+/259561 and also avoids walking up the contexts Change-Id: I9f016b7346db088dfe1519924c9770e486b46ec9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add valueRole API to ComboBoxMitch Curtis2019-04-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-124-8/+83
|\| | | | | | | Change-Id: I79759d4101b5267c5d9d74ccb81e994da002b0ef
| * Update plugins.qmltypes for Qt 5.13Kai Koehne2019-03-073-3/+78
| | | | | | | | | | | | | | Task-number: QTBUG-73484 Change-Id: I5c6019ec015a7d423dcc103d1acf23383c5b6239 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * SplitView: fix revisions, imports and \since versionsMitch Curtis2019-03-071-5/+5
| | | | | | | | | | | | | | | | 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.13' into devQt Forward Merge Bot2019-03-051-0/+2
|\| | | | | | | Change-Id: Ia4c5ae4b49beb24b7abb0502990b79bd54ca74ec
| * Explicitly set import namesKai Koehne2019-03-041-0/+2
| | | | | | | | | | | | | | This makes sure the qmltypes target for qml_plugin's works. Change-Id: I4a7624aa2db2eb40b9b44f158e099c651b1249cb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | ScrollBar: set a default minimumSize for all stylesRichard Moe Gustavsen2019-03-041-0/+1
|/ | | | | | | | | | If you don't specify a minimumSize, the scrollbar handles will be "invisible" when the size of the content view is much larger than the viewport. Since having hidden handles is pointless, set a default minimum size to be the same as the height of the handle. Change-Id: Ia486a616308b5edfd6aa6a29f34a6fc9030c276b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qquickfusionstyle.cpp: Fix deprecation warningFriedemann Kleint2019-02-251-1/+1
| | | | | | | qquickfusionstyle.cpp:85:31: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: I5640132d28abf15f9e4dad474b27cc8f119b4d65 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-161-1/+4
|\ | | | | | | Change-Id: I0d52818c7b221a6434acc6c960090a13d3d9febe
| * Fusion: fix buttons colorsMitch Curtis2019-02-111-1/+4
| | | | | | | | | | | | | | | | | | Make Active and Disabled colors closer to Widgets' Fusion style. Task-number: QTBUG-70819 Change-Id: I61cf22eb4449b5443fa71349da8df2ff57ee9158 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-alpha1Qt Forward Merge Bot2019-02-022-18/+5
|\| | | | | | | Change-Id: I13c6458d7a7f92daf58c12e4c120d99a1f56cbfa
| * Fusion: use white ButtonText when a dark system theme is in useMitch Curtis2019-01-311-1/+5
| | | | | | | | | | | | | | | | | | | | Button's text was previously black on a dark background with macOS' dark mode. This patch makes it more readable. Task-number: QTBUG-70819 Change-Id: Iaa9d31133434e67e04d5d831dcb8eeba191cbab4 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * qquickfusionstyle: do not force a fixed white color for highlightedTextNils Jeisecke2019-01-291-17/+0
| | | | | | | | | | | | | | | | | | just like the previous fix for for the highlight color: use the system palette. Task-number: QTBUG-70652 Change-Id: I5c31927c53ba386f54de7c46ec9fe66c26e7a31b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-1052-250/+251
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
| * Make it visually clear which ComboBox item is the current itemMitch Curtis2018-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do as the Default style does and make the current item bold. If we don't do this, it can be impossible to distinguish the current item from the highlighted item, especially when the popup obscures the button. Change-Id: If40b9c73c207d07fb5669564cdcfcea29ebed2f1 Fixes: QTBUG-68794 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-0552-250/+250
| |\ | | | | | | | | | Change-Id: I7fe9e74beff3cdbfbf02ee0f129a8204ad31046e
| | * Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-0252-250/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-042-3/+1
|\| | | | | | | | | | | Change-Id: I0d2601b897e4cb8ce7a0d562927f3895d1f08f25
| * | qquickfusionstyle: do not force a fixed blue color as highlight colorTimur Pocheptsov2018-11-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | use the one from ... mac system palette. Task-number: QTBUG-70652 Change-Id: I0aa9ab0596ceb8222327d9febbb132fffc3968cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Fix compilation with qreal=floatFriedemann Kleint2018-11-261-1/+1
| |/ | | | | | | | | | | | | | | Introduce casts where required. Fixes: QTBUG-71952 Change-Id: I63a99d6918bc00367439e967e3c45a733b41c482 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* / Add SplitViewMitch Curtis2018-11-132-0/+57
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>