aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projectswip/cmakeAlexandru Croitor2020-03-171-0/+176
| | | | | | 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-176-8/+185
|\ | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-103-1/+137
| |\ | | | | | | | | | | | | | | | | | | 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>
| | * Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-113-1/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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 Bot2020-02-082-0/+40
| |\| | | | | | | | | | Change-Id: I4b20284eb05b6277c758a1ab5579b803db9a84ca
| | * Upgrade qsb files to version 4Laszlo Agocs2020-01-212-0/+40
| | | | | | | | | | | | | | | | | | | | | Also add a compile.bat following the qtdeclarative pattern. Change-Id: Id2350ce6650ca22c1c6403a565c33137ff5a3c64 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@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-2517-4/+181
|\| | | | | | | | | | | Change-Id: I61919fabd4a3a07ed374f2c3c1fae2d589d6e124
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-232-1/+2
| |\| | | | | | | | | | Change-Id: I65b34cc9ac31ecf2b768ec8e45ac635df7e9cba4
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-162-1/+2
| | |\ | | | | | | | | | | | | Change-Id: I932a1b1606975265e6affd50e161e58737404a0d
| | | * 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>
| | | * SwipeView: fix issue where child items couldn't get focusMitch Curtis2019-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the focus property of the contentItem (ListView) to the focus property of the SwipeView itself. Change-Id: Ic410f7fb8db9fbb758b956dfe07e1b4265f5f687 Fixes: QTBUG-62401 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.14' into 5.15Qt Forward Merge Bot2019-11-0912-0/+0
| | |\| | | | | | | | | | | | | Change-Id: Ib14b8c77cefe7aaf5b11483d9a30b2ef05314598
| | | * 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/+177
| |\| | | | | | | | | | | | | | | | | | Change-Id: I89a29c7040e233314885eb37731f53dba8ed6c1a
| | * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-261-1/+177
| | |\| | | | | | | | | | | | | | | | | Change-Id: If43d5edea9ec0d4beaa3336b3e9aeefc698c5e6b
| | | * | Update plugins.qmltypes for 5.14Kai Koehne2019-10-211-1/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: I0e421232f4335a7a351562f23134eccdd0b1c674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-192-2/+2
| |\| | | | | | | | | | | | | | | | | | Change-Id: I770f99d20878ddf16ab3f4b1a5422e7192622f64
| | * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-122-2/+2
| | |\| | | | | | | | | | | | | | | | | Change-Id: I342393f83eab161df8ad6323051c5fadb4cf9ddc
| | | * | Minor performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions that return const & Change-Id: Ibf35e54ffb78f164493222125411f2ba279cb861 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>
* | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-151-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
| * | | | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-041-2/+2
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ifa2fade18b10478370131f0dee875ab1a37c7772
| * | | | Adapt to new Connections syntaxUlf Hermann2019-09-061-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | Fixes: QTBUG-77734 Change-Id: I22b0c6a46e10780e02c56c250356f1aa87d1050f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Update QtQuickControls2 project filesLeander Beernaert2019-10-082-13/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-155-74/+107
|\ \ \ \ | | |/ / | |/| | | | | | Change-Id: I62feb82fcf389bf83c92f83e2ed1a6783d3179ba
| * | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-08-113-0/+29
| |\| | | | | | | | | | | | | | Change-Id: I7c03e9e5227899188d4e16467f692419dc9e9c5b
| | * | Enable Material style with RHILaszlo Agocs2019-07-253-0/+29
| | | | | | | | | | | | | | | | | | | | Change-Id: I9100d20b76b9cc6ac138f474e5d808db19ed6684 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | 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/+136
|/ / | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-042-3/+2
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-042-3/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Material: account for accent color in flat highlighted button's rippleKonstantin Ritt2019-05-211-2/+1
| | | | | | | | | | | | | | | | | | | | | According to https://material.io/design/components/buttons.html#text-button Change-Id: Ia36a676864a8f738d204cf8db9430b797f1f2f99 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * CursorDelegate: stop cursor timer when interval is set to 0Richard Moe Gustavsen2019-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cursor flash iterval can sometimes be set to 0. This is done from e.g the iOS plugin while selecting text, since the cursor should not flash when the user is dragging it around inside a magnifier glass. Setting the interval to 0 simply means "don't flash", rather than "hide the cursor". But setting the interval of a QML Timer to 0 will cause it to never trigger, which is not what we want, since then the cursor can end up staying hidden if done in-between two "flashes". This patch will add an extra condition that checks for this case. Fixes: QTBUG-75844 Change-Id: Ib1ca594a49a18cb161a2b2a67928fb6766984988 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Qualify unqualified id lookup in controlsFabian Kosmale2019-06-1115-42/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+203
|\| | | | | | | | | | | Change-Id: I79759d4101b5267c5d9d74ccb81e994da002b0ef
| * | Update plugins.qmltypes for Qt 5.13Kai Koehne2019-03-073-3/+198
| | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-1055-185/+185
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
| * 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>
* | Add SplitViewMitch Curtis2018-11-132-0/+75
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>