aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/imagine
Commit message (Collapse)AuthorAgeFilesLines
* Qt Quick Controls: add DoubleSpinBoxXavier BESSON2025-12-042-0/+121
| | | | | | | | [ChangeLog][Controls] Added DoubleSpinBox. Fixes: QTBUG-67349 Change-Id: Icb2f02162825daf74778de725f80af63874a5d16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickControls: Fix linkage of controls stylesUlf Hermann2025-11-281-0/+1
| | | | | | | | | | | | They need to link the styles they import so that the dependencies are clarified (and also they'll in fact need the linkage if we ever compile them in direct mode). Pick-to: 6.10 Task-number: QTBUG-137440 Change-Id: I6edaba4390dce4f9cc2b95586f28331192cc01ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SearchField: Add Imagine styleDilek Akcay2025-11-19167-0/+160
| | | | | | | Task-number: QTBUG-137318 Pick-to: 6.10 Change-Id: I3d5d9c35b214bc1c9878c7b81df32ceed1ac16fc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix QQuickIconLabel action icon color being overridden by style defaultMitch Curtis2025-11-1810-28/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Styles need a way to set the default icon color for controls. Until now, that was done like this: icon.color: "tomato" contentItem: IconLabel { icon: control.icon } This breaks the use case of e.g. an Action that sets its own icon.color, because the icon property of the control always takes precedence (see 146bc9517c56feda4eba34282d3cc53bd47b6267). This patch adds a defaultIconColor property to IconLabel, which allows styles to specify a color without overriding any potential action's icon: contentItem: IconLabel { icon: control.icon defaultIconColor: "tomato } If icon.color was explicitly set, it is used instead. This does mean that overriding the contentItem will result in the icon color being lost, but that is already the case for style customizations in general. All controls that set icon.color and using IconLabel to display their icon are affected and are therefore adapted: Button, CheckDelegate, DelayButton, ItemDelegate, MenuBarItem, MenuItem, RadioDelegate, RoundButton, SwipeDelegate, SwitchDelegate, TabButton, ToolButton. Add FlowPane to the shared folder of the baseline test and use it in the tests that we touch. This fixes two issues: - Using Pane as the background fixes text being invisible for some styles. - Using Flow provides the most space-efficient layouting of items now that we have more than would fit in the old layout. Task-number: QTBUG-87459 Change-Id: I455ce7202a46b7cfa7545650574e48ad72796675 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Context menus: rename control to editorMitch Curtis2025-11-123-8/+8
| | | | | | | | | | | | | | This better reflects what it is and avoids naming conflicts with the controls themselves. Pick down to 6.9 (where QQuickContextMenu was introduced) to avoid future cherry-pick conflicts. Task-number: QTBUG-133556 Task-number: QTBUG-134903 Pick-to: 6.9 6.10 Change-Id: If0af26c5f16ee56cc909fcc66d1421109786343e Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Change PopupType of textEditingContextMenu for Popup.Item on WaylandFrederic Lefebvre2025-10-311-1/+1
| | | | | | | | | | | | | | | | Use Popup.Item popupType when test is run on Wayland. Remove the need for a transient parent on Wayland that was causing several tests of tst_QQuickTextField to consistently fail. Fix the following failing tests on Ubuntu 24.04 wayland tst_QQuickTextField::contextMenuCopy, contextMenuCut, contextMenuDelete, contextMenuPaste, contextMenySelectAll, releaseAfterPressAndHold, touchscreenDoesNotSelect. Pick-to: 6.10 Change-Id: I5a411dae63ae36361ed83055a1eb4c87de17acae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Set explicit default security level of all files with default securityJan Arve Sæther2025-09-1760-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | The files (folders) already processed are listed in each issue in epic QTBUG-134547 These files were processed half a year ago. In order to make it clear that all of these files are already processed, mark them with an explicit default security header. For the record, this was generated with this script: find -E . -regex ".*\.(cpp|h|hpp|mm|qml|js)$" | xargs python3 ~/bin/add-cra-header.py in the folders listed in each subtask of QTBUG-134547 (add-cra-header.py only exist at my desktop, but it simply adds the default security header if it doesn't already have any existing security header) QUIP: 23 Fixes: QTBUG-134547 Pick-to: 6.10 6.9 6.8 Change-Id: Ieb8c78ea6561fdbdd27c7b13185ece853eedf80f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* VerticalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari2025-08-081-0/+3
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I3a26307f304277dfd259da3736d1069a43c0cd03 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* HorizontalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari2025-08-081-0/+3
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I11fcf5317add4c07e211cff70d3b2e86bd470000 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove year from Qt Copyright in REUSE.tomlLucie Gérard2025-07-141-1/+1
| | | | | Change-Id: I37d9d62856ac120be97cc929d298ffb77ba4a3af Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Prevent creation of private modules without private headersJoerg Bornemann2025-03-131-0/+1
| | | | | | | | | | Add NO_PRIVATE_MODULE to the creation flags of module that don't have any private headers. There's no point in creating private modules for them. Task-number: QTBUG-132526 Change-Id: I76b820f3348a5066b0aac740d4e0be8ddeadc4dd Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QuickControls: Add vertical and horizontal header view delegatesMohammadHossein Qanbari2025-03-065-48/+66
| | | | | | | | | | | | | | | | | | | | | | Implement QQuickHeaderViewDelegate as the base class for header view delegates, introducing 'headerView' and 'orientation' properties. Separate previous delegate settings into HorizontalHeaderViewDelegate and VerticalHeaderViewDelegate components for Basic, Fusion, and Imagine styles. This change improves the modularity and reusability of header view delegates across different styles. It also allows for more consistent behavior and easier customization of header views. A test suite has been added to verify default property settings and ensure the new components work without warnings. [ChangeLog][QtQuickControls][HeaderView] Add dedicated delegate components for vertical and horizontal header views. Task-number: QTBUG-70326 Change-Id: I8831e77f6909bdae13c3a7262145ab156f63a59a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Avoid leaking Private dependencies for style pluginsAlexandru Croitor2025-02-281-2/+2
| | | | | | | | | | | | | | | Use qt_internal_extend_target instead of target_link_libraries for the Qt Quick style plugins. This wraps their private module dependencies in BUILD_INTERFACE genexes. It avoids leaking the deps to consumers of the style plugins in a static build, where the private modules are not in scope by default. Pick-to: 6.8 6.9 Change-Id: Iac4b9d97c112fa829a60170d7fdad60f97e43f1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* ContextMenu: add to text editing controlsMitch Curtis2025-02-284-0/+40
| | | | | | | | | | | [ChangeLog][Controls] TextField and TextArea now provide a ContextMenu by default. If you already have a custom context menu for these types, ContextMenu will not open its own on e.g. right click. Fixes: QTBUG-35598 Pick-to: 6.9 Change-Id: I0897a7ba5e1b5b6d5425c80cbc6f2550c904605b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Take safe areas into account for Qt Quick Controls DrawerTor Arne Vestbø2024-12-191-4/+4
| | | | | | | | | | | When the drawer is pulled in from the side we want it keep its content away from the non-safe areas, while still drawing the background edge to edge. Pick-to: 6.9 Change-Id: Iff145df719f5746cbdb1d3c13494967c5993c6e6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Compute implicitSize based on implicitContentSize in Popup and subclassesTor Arne Vestbø2024-12-195-10/+10
| | | | | | | | | | | | Popup uses a Pane as its popup item, so now that Pane reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: I3709978dae0271d7daf44fc6988f09f03df15b1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Take safe areas into account for Qt Quick Controls ToolBar and MenuBarTor Arne Vestbø2024-12-191-4/+4
| | | | | | | | | | | | | | | A ToolBar and MenuBar is commonly placed in the header/footer/menuBar of an ApplicationWindow, where we don't do any automatic padding to account for the safe area. By adding the safe area margins as padding to the controls, we ensure that the control's background flows into the non-safe area, while the content item of the control (the toolbar or menu bar content) is kept within the safe area. Pick-to: 6.9 Change-Id: I5fad7394beaa01ae8ed142e4e2e42c5bffaab9fa Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Compute implicitSize based on implicitContentSize in Container and subclassesTor Arne Vestbø2024-12-183-6/+6
| | | | | | | | | | | | Now that Container reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: If0a710a5eb4a35c91d02d7170b5e03e457e6bc12 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Compute implicitSize based on implicitContentSize in Pane and subclassesTor Arne Vestbø2024-12-186-12/+12
| | | | | | | | | | | Now that Pane reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: Ie31b740a1e405341fc5f0ed9673b213292e4afd9 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Add REUSE.toml files and missing licensesLucie Gérard2024-10-291-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | REUSE.toml files are read by reuse to complement or override the copyright and licensing information found in file. The use of REUSE.toml files was introduced in REUSE version 3.1.0a1. This reuse version is compatible with reuse specification version 3.2 [1]. With this commit's files, * The SPDX document generated by reuse spdx conforms to SPDX 2.3, * The reuse lint command reports that the Qt project is reuse compliant. In order to be reuse compliant all the licenses referenced in file or within a REUSE.toml files must be present in the LICENSES directory at the base of the module. The missing licenses are added. [1]: https://reuse.software/spec-3.2/ Task-number: QTBUG-124453 Task-number: QTBUG-125211 Change-Id: I5a83879a7fee1bba046b2c53d9727dc0cde05c25 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Dialog: Hide title if inside a popup windowOliver Eftevaag2024-06-211-1/+1
| | | | | | | | | | | | Popup windows with the Qt::Dialog flag, will display the title in its window decoration. Because of this, it's redundant to also display the title inside the dialog. Pick-to: 6.8 Change-Id: Ib052a950216248c889983361063c8e46f4cffdfa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tumbler: fix warnings when swapping contentItemMitch Curtis2024-06-121-2/+4
| | | | | | | | | | | | | | | | | | | Referring to the contentItem property of Tumbler from within the contentItem itself was a way to avoid using ids (which prevent deferred execution). However, the new contentItem may not have a delegateHeight property, so we move the declaration up to the Tumbler itself to ensure that it's always available. Until QTBUG-11984 is implemented, we have to use the "__" prefix to mark the property as "private" and (hopefully) lessen the chance that it will show up in auto-completion within users' IDEs, since it's not part of the public API (this is also why we've historically avoided declaring properties here). Fixes: QTBUG-119647 Pick-to: 6.5 6.7 Change-Id: Ie8646e605b0c7b1e804a6c4da4046613f958e51d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Vladimir Belyavsky <belyavskyv@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove the use of GENERATE_CPP_EXPORTS argumentAlexey Edelev2024-06-111-1/+0
| | | | | | | | | The behavior that argument was enabling is the default one now. Pick-to: 6.8 Task-number: QTBUG-90492 Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Imagine: fix warnings in Slider in case of null handleVladimir Belyavsky2024-04-081-3/+6
| | | | | | | | | | Fix warnings, such as "TypeError: Cannot read property 'width' of null" in case when the handle is null Fixes: QTBUG-119633 Pick-to: 6.7 Change-Id: Idc3f759ce7983cf37bee5e633d9d83eb4180ac56 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Imagine: fix warnings in RangeSlider in case of null handleVladimir Belyavsky2024-04-081-6/+9
| | | | | | | | | | Fix warnings, such as "TypeError: Cannot read property 'width' of null" in case when the handle is null Fixes: QTBUG-119572 Pick-to: 6.7 Change-Id: I4156774f98f58a44bb866c84c3a398ed82e9a136 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Dialogs: Depend on controls styles in QuickDialogs2QuickImplUlf Hermann2024-02-094-11/+21
| | | | | | | | | | | This forces them to be built before, making their qmltypes available to the subsequent build steps. Having the styles as linkable backing libraries also makes their C++ types available to qmlsc's direct mode. Pick-to: 6.7 6.6 Task-number: QTBUG-121643 Change-Id: I24688b325d27f16e7cc77219cf481b3b30ca52a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QuickControls: Link the impl libraries into the base modulesUlf Hermann2024-02-022-3/+3
| | | | | | | | | | | | | | | This forces the build system to build them before, making the qmltypes files available to the base modules' build steps. The linker might even actually link the libraries and avoid the excessivle plugin loading that way. To encourage that, also drop the pointless NO_PLUGIN_OPTIONAL. Pick-to: 6.7 6.6 Task-number: QTBUG-121643 Change-Id: Ifd9082a5927deac8c9d67edf4104338ddaa35aa5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickImagineTheme: check if "Open Sans" font family is availableVladimir Belyavsky2023-11-221-3/+7
| | | | | | | | | | | Check if "Open Sans" font family is available before using it as a default font family for Imagine style. This prevents us from missing family fallback lookups, which can be slow. Fixes: QTBUG-119298 Pick-to: 6.6 6.5 Change-Id: Icf6e9d6bbe00ec0b014de24a8fdee73895ddc6e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_dial: fail on warningsVladimir Belyavsky2023-11-221-3/+4
| | | | | | | | | | | | | Enable fail on warnings for all tests in init() method. Also fix last warnings, like "tst_controls::Basic::Dial::test_nullHandle() qrc:/qt-project.org/imports/QtQuick/Controls/Basic/Dial.qml:43: TypeError: Cannot read property 'width' of null" And finally, as a drive-by change, replace 'var' with 'let' Task-number: QTBUG-98718 Pick-to: 6.6 6.5 Change-Id: I80d0a8319791182a1429e5541c80bdac1131d1c0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Menu: fix contentItem's interactiveMohammadHossein Qanbari2023-11-161-2/+2
| | | | | | | | | | | | | | The interactive property of the Menu's contentItem depends on its Menu (control) when Window.window is valid. In the case of a fixed-height menu, even if the contentItem's height is smaller than Window.window.height, the interactive property of the contentItem would be false if the menu's height is smaller than the window's height and also smaller than its contentItem's height. Fixes: QTBUG-93856 Pick-to: 6.6 6.5 6.2 Change-Id: If95080250c3953d4293a9e1dbcc6225d21ee034f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add copyright header to OpacityMask shader codeMatthias Rauter2023-03-291-0/+3
| | | | | | Pick-to: 6.4 6.5 Change-Id: I465f166855955b027b0ce4ba3d09f9fcf994bc1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: Improve various delegatesUlf Hermann2023-03-273-6/+23
| | | | | | | | | Their internal components should be bound, they should use required properties, and they should prefer IDs over the "parent" property. Change-Id: Iac61a4d7b9daf34928a1b41a29658e491e3ac39f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: Remove the model/modelData workaroundsUlf Hermann2023-03-273-7/+3
| | | | | | | | Now that model has modelData as anonymous property and also has useful properties for list models, we can remove the workarounds. Change-Id: I744247821fba3c14e5bfff125daeeb7a3128f3b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: condition shaders at build timeLaszlo Agocs2023-03-087-51/+24
| | | | | | | | | | | The machinery inherited from Qt 5, with file selectors and whatnot, is simply not needed anymore. Pick-to: 6.5 Change-Id: If0728a4fa057335fe8471899da50b836f8d56d35 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build with -no-feature-settingsTasuku Suzuki2023-03-031-0/+2
| | | | | | Pick-to: 6.5 Change-Id: I3667e087b13fba6f9804b76d2d0bed2ffefbddbe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* HeaderView: Use Label instead of Text in the delegatesRichard Moe Gustavsen2023-01-132-2/+2
| | | | | | | | | | | | | | The Text item will not follow the application font. So rather than using Text inside the delegates, use Label. HeaderView doesn't currently have a font property that can be set by the application, but using Label will at least ensure that it ends up using the same font set on a parent control (e.g ApplicationWindow, at the very least). Pick-to: 6.5 6.4 Change-Id: I9b10a7b9ac74e6f67f0644f3a2376f13e3da2c8d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* HeaderView: ensure that the implicit size is greater than zeroRichard Moe Gustavsen2023-01-122-2/+12
| | | | | | | | | | | | | | | | | | | HorizontalHeaderView should have the same implicit height as the delegate items it contains. And this height is reflected by contentHeight. The problem is that the content height is zero at start-up, before the view gets populated with delegate items. The result is that the height of the view will then be zero at start-up, which can lead to TableView not loading any items at all. This patch will therefore ensure that the implicit height of HeaderView is 1 at start-up, so that the delegate items will be loaded. Once loaded, the implicit height of the view will be adjusted to the correct value. Pick-to: 6.5 Change-Id: I5181840665f648275e28dd8fe943e759797388fa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Spinbox: clip contentItemRichard Moe Gustavsen2022-12-191-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the text in a SpinBox is larger than its text field, then the text is drawn outside of the SpinBox covering the spinbox buttons. This patch will set a clip on the SpinBoxes, to ensure that the text is not drawn outside the bounds of the content item. The SpinBox implementation differs a bit from one style to the next, which means that some styles will only need to set a clip, while others will need a bit more change. Especially the Basic style will need to expand the size of the content item to make room for the focus rect (which the other styles don't have, or implement differently). There are also two versions of the SpinBox; One that has the up and down indicators placed on each side of the content item, and another that has them collected on only one side. It seems like the latter implementations has done a copy/paste of the padding from the former, and thereby has set a too large padding. This has also been fixed, as it's related to the clipping bug. Fixes: QTBUG-98355 Pick-to: 6.5 6.4 Change-Id: I2c1ce6d477cf809e2187fd80aecbc9edeb8e0c2d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-011354-0/+3920
Qt Quick Controls 2 was named that way because it was a follow-up to Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer supported, we don't need to have "2" in the name. Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. By doing this renaming a few weeks before feature freeze, it won't affect the release but still results in as little time possible spent manually fixing conflicts in cherry-picks from non-LTS releases as a result of the renaming. This patch does the following: - Renames directories. - Adapts CMakeLists.txt and other files to account for the new paths. A follow-up patch will handle documentation. It does not touch library names or other user-facing stuff, as that will have to be done in Qt 7. Task-number: QTBUG-95413 Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>