aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols
Commit message (Collapse)AuthorAgeFilesLines
* SearchField: Prevent indicator warnings in testbenchDilek Akcay4 days1-4/+4
| | | | | | | | | | | | | In the SearchField testbench manual test for the macOS style, some warnings were appearing because the x and y positions of the indicators are used in this style, but are set to null in certain test cases. A condition was added to check whether the indicators are set before accessing their positions, preventing these warnings. Fixes: QTBUG-141882 Pick-to: 6.11 6.10 Change-Id: I1c7a208ff32e570e384a2c41689cbfbb6d218be6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Fix QML markup and module linksDavid Boddie5 days5-13/+13
| | | | | | | | | Prevent auto-linking from occurring in places where QDoc will create an incorrect link. Pick-to: 6.8 6.10 6.11 Change-Id: I8a031a3545ea3a785e0cbe762e84c179899e694f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* macOS: add some padding inside a Frame and GroupBoxRichard Moe Gustavsen5 days2-0/+9
| | | | | | | | | | | | | | | | | Previously, the padding was taken from NativeStyle.Frame, which effectively returned the margins from QQuickCommonStyle. These margins only account for the frame border width and nothing else. As a result, controls appear glued to the edge of a Frame when using the macOS style, unless the application explicitly overrides the margins. This patch therefore hard-codes margins matching those used by the Fusion style, giving Frame and GroupBox a bit more visual “air”, similar to the other styles. Pick-to: 6.11 6.10 6.8 6.5 Change-Id: I6a80530d07a43bcaa6761cf3fc2d8a14e1fd0977 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: draw ComboBox correctly on macOS 26Richard Moe Gustavsen5 days1-0/+9
| | | | | | | | | | | | | | | | | | On macOS 26, the down indicator in editable ComboBoxes was drawn with scaling applied, causing it to appear distorted. In addition, the focus frame was misaligned for both editable and non-editable ComboBoxes. This patch ensures that ComboBoxes are drawn with 9-patch scaling disabled. Previously, enabling 9-patch scaling caused the down indicator to be scaled together with the background, resulting in incorrect rendering. The patch also adjusts margins to properly center the label and align the focus frame with the control’s frame. Pick-to: 6.11 6.10 6.8 6.5 Change-Id: I0aafd77dd7ec098589c92fbc161a530a777b1d91 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* FluentWinUI3: don't override propertiesMitch Curtis6 days2-6/+4
| | | | | | | | | | | | | | | | | | | | These warnings cause tests to fail: Member state of the object StyleImage_QMLTYPE_29589_QML_29616 overrides a member of the base object. Consider renaming it or adding final or virtual specifier Member __notCustomizable of the object SearchField_QMLTYPE_168 overrides a member of the base object. Consider renaming it or adding final or virtual specifier Amends d3ba7eb9badc931450f1c033d1bfc1763ca5ecb5 and 141993c0a5b2a2b6ea244c6bee2ca3141b1a020a. Pick-to: 6.10 6.11 Change-Id: I03d83cdae27715b391ea67372e0b25267d729c77 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
* iOS Switch: Change color of indicator in high contrast modeOliver Eftevaag6 days13-1/+2
| | | | | | | | | | | | Some of the controls uses image assets as their background. The Switch is one of those controls, and it's also the control that changes its appearance the most when "Increase contrast" is toggled on. Done-with: Karolina Bang <karolina.bang@qt.io> Fixes: QTBUG-142421 Pick-to: 6.11 Change-Id: I350716155bd9a75c241ddc601821de3ded6f7fcb Reviewed-by: Doris Verria <doris.verria@qt.io>
* SearchField: Update the control's documentationDilek Akcay6 days1-0/+22
| | | | | | | | | | | SearchField documentation was outdated. The description of currentIndex was updated, and a note was added for the iOS style explaining that the control doesn't provide a popup in order to preserve the native look. Pick-to: 6.11 6.10 Change-Id: I6ff23f51c0cf73a44baad7236c176363b3970f8e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Remove stale version information from Qt Quick ControlsAlexei Cazacov13 days8-104/+116
| | | | | | | Fixes: QTBUG-141045 Pick-to: 6.11 6.10 Change-Id: Ieb8882f4f07c0893095481e7f9104069cf92a389 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Qt Quick Controls: add DoubleSpinBoxXavier BESSON2025-12-0423-40/+1138
| | | | | | | | [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-288-0/+8
| | | | | | | | | | | | 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: Prevent clipped search icon on macOS 26(Tahoe)Dilek Akcay2025-11-281-2/+1
| | | | | | | | | | | | | macOS 26 (Tahoe) changed NSSearchFieldCell: the magnifying glass icon is taller. Drawing it at the button's full rect causes the top to be clipped by the bezel, though the clear icon remains fine. To avoid this, we render the search icon at a fixed, smaller size to prevent upscaling and eliminate clipping after 26.0. Fixes: QTBUG-141776 Pick-to: 6.10 Change-Id: Ifb5f4476253e55e700b8b89e864afdbb2ceedd8f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: add StyleKit to labsRichard Moe Gustavsen2025-11-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new styling API for Controls called StyleKit. StyleKit provides a higher-level, key–value–based approach to styling applications, serving as an alternative to working directly with the lower-level Templates API. The primary goal of StyleKit is to offer a unified API for styling both Controls and Widgets. The current Templates-based approach relies heavily on JavaScript, which makes it unsuitable for use with Widgets. This initial version supports Controls only; support for Widgets will be added in a future update. StyleKit is designed to make it easier for designers and UI developers to: - Focus on visual styling rather than Template logic (such as geometry, delegate positioning, and handle placement). - Allow style properties to propagate, enabling you to factor out common styling into shared control types and override only what differs in the more specific control types. - Style controls independently in each of their states, without needing nested ternary expressions to check state. - Define and apply multiple themes with minimal effort. - Provide different style variations depending on context. For example, styling a Switch differently when it appears inside a ToolBar. [ChangeLog][Qt labs] Introduced new QML module 'StyleKit'. StyleKit provides a flexible styling framework for Qt Quick Controls, enabling developers to define reusable styles and themes using a simple key-value property format. Change-Id: Iae25324486aea7a7b9b2ce52135327ec7e9b6f59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Add alternate text for Qt Quick and Qt Quick Controls imagesJerome Pasion2025-11-2621-0/+420
| | | | | | | | | | Alternate text (alt text) improves the documentation experience for screen readers and for other accessibility tools. Pick-to: 6.9 6.10 Task-number: QTBUG-135120 Change-Id: I975c3de11f893882fb9a27218079f244bd38a622 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add iOS style for SearchFieldDilek Akcay2025-11-268-0/+111
| | | | | | | Task-number: QTBUG-137318 Pick-to: 6.10 Change-Id: Iead7b9ad0bf22c96d94ab70795fed854f613f6d7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@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>
* Set icon size for native stylesMitch Curtis2025-11-183-0/+9
| | | | | | | | Otherwise they use the implicit size of the image. Pick-to: 6.8 6.10 Change-Id: I29a57bd9339574e7107a5fe471f2d246d7f97b86 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Fix QQuickIconLabel action icon color being overridden by style defaultMitch Curtis2025-11-1865-251/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1227-72/+72
| | | | | | | | | | | | | | 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>
* SearchField: Add Universal styleDilek Akcay2025-11-0310-0/+158
| | | | | | | Task-number: QTBUG-137318 Pick-to: 6.10 Change-Id: Id5777edd049185f885100f0399afe1f4f7f6cbe5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Change PopupType of textEditingContextMenu for Popup.Item on WaylandFrederic Lefebvre2025-10-316-6/+6
| | | | | | | | | | | | | | | | 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>
* Propagate attached properties for items within the popup windowSanthosh Kumar2025-10-281-4/+12
| | | | | | | | | | | | | | | | The attached property doesn't propagate to the sub-menu items within the pop when the pop-up type is configured as Popup.Window, as the attached property, is provided only for the immediate window (made as part of patch d824585075b0abaec12c0cbb6445aa4eb84b2cea) and not further up. This patch ensures that the attached property is provided for the window if configured for anything further up in the hierarchy. Fixes: QTBUG-139603 Pick-to: 6.10 6.9 6.8 Change-Id: I95b9f735b7e19ad9916562bf09445fd20f2ba1f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Slider/RangeSlider: ensure empty groove has the correct lookRichard Moe Gustavsen2025-10-242-33/+17
| | | | | | | | | | | | | | | | | | | With Liquid Glass enabled, the groove of the Slider and RangeSlider had a border which made the groove look taller than the track/progress (which had no border). But looking more carefully at the native NSSlider in Xcode, it shows that the Slider groove (and track) should no longer have any border at all (which is different from how it looks in macOS 15). This patch will therefore draw the track without a border when running with Liquid Glass. Using nested rectangles in order to draw the slider in the macOS 15 style was also unnecessary, as we can achive the same look by using a single Rectangle. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I9d03a212f39857a448d103372636e9a12a7cbd3f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* ProgressBar: ensure the groove resepect the width of the controlRichard Moe Gustavsen2025-10-241-2/+4
| | | | | | | | | | | | | | | As it stood, the progress bar groove would not be resized according to the size of the control, since it lacked at width binding. This patch will make sure to resize the groove correctly. It also fixes a binding loop warning related to the use of Loaders in combination with childrenRect in the same go. Fixes: QTBUG-141182 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I1aa87db339b04686ca521b486e4c7a05683a7679 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* MaterialStyle: Fix reset behavior for foreground and backgroundJarkko Koivikko2025-10-151-6/+6
| | | | | | | | | | | | | | | | | | Resetting foreground and background values did not propagate to children when the earlier value matched theme default. Stop pre-clearing m_hasX/m_customX in reset. Clearing these variables prevents propagating the values to children due to early exit conditions in the inherit functions. Clear only m_explicitX and call inherit with the parent's values. m_hasX/m_customX values are then cleared in the inherit function, if changed. This guarantees propagation to children even when the color is unchanged. Pick-to: 6.10 6.8 Change-Id: Ie4f7276d43afbfaf5b4d10ccf658f27000d640d9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* MaterialStyle: Fix early out conditions for background and foregroundMorteza Jamshidi2025-10-151-7/+6
| | | | | | | | | | | | | | | | | This change fixes setting the background or foreground explicitly to the theme default. The value did not persist. Example case for background: The default m_hasBackground is false and background color is globalBackground that is 0xFFFAFAFA, so if user sets the background color to 0xFFFAFAFA the logic skips it by doing early out and doesn't set m_hasBackground to true. Fixes: QTBUG-140068 Change-Id: I26f1182d808354f34800dc62760e5498cbd77b3b Pick-to: 6.10 6.8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* quickcontrols - material style: postpone updating qsgnodesInho Lee2025-10-131-23/+63
| | | | | | | | | | | | | | QQuickAnimatedNode uses beforeRendering and this connection can conflict with Quick3D render prep. Updating qsgnodes will be delayed for now to prevent the crash. Fixes: QTBUG-126193 Pick-to: 6.10 6.8 Change-Id: I29aa09fb6a52a4446818699bebf42eabf613c43f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* FluentWinUI3: Fix ComboBox size when the model changesKaj Grönholm2025-10-092-9/+7
| | | | | | | | | | | | | | | | The problem was that enter Transition dynamically adjusts from and to values and these values are not up-to-date. Also, transition animates height property while from and to also depend on it. Solve this by animating instead __heightScale with non changing from & to values, so synchronizing property changes are not needed. Do the same change for Menu that uses a similar approach. Pick-to: 6.10 6.8 Task-number: QTBUG-138744 Change-Id: Ibede68a2d20ef437e0bc1637b5177f10c62935dd Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fusion Button & RoundButton: bind icon.color to a palette colorOliver Eftevaag2025-10-082-0/+4
| | | | | | | | | | | | | | | The icon's color would adapt poorly to theme changes. A good example is the QML media player in qtmultimedia, with has a few buttons with icons and no text. When changing between a light and dark theme, the icon would still have the same color, and there would barely be any contrast between the icon and the button's background when using a dark theme. The binding created in this patch is taken from the Basic style. Pick-to: 6.10 6.8 Change-Id: I922823a9109fd252c5a4ed84aba1c0a36adec263 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* mac style: update SwitchRichard Moe Gustavsen2025-10-082-72/+159
| | | | | | | | | | | | | | | | | | On macOS Tahoe 26, the native AppKit Switch has changed apparance to become wider, with a liquid glass effect on the handle. This patch will therefore update the Controls Switch to do the same. That is, change the Switch to be equally wider if the app is running with liquid glass, and change the appearance of the handle to look a bit closer to the native handle. Note that the Switch in Controls has always been drawn 'manually' with QML, so this change is not really fixing a regression, but is more of a style update. Task-number: QTBUG-138942 Change-Id: I1c7c9beb35845dac29c0fc67bd0813fffa313116 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* ScrollView: use padding if no rightPadding or bottomPadding is setMorteza Jamshidi2025-10-062-4/+12
| | | | | | | | | | | | | Because rightPadding and bottomPadding properties are set in the windows and macos ScrollView style implementation if the user try to set the padding property there will be no effect. So with this change we make sure that the padding property is used if rightPadding or bottomPadding aren't explicitly set by the user. Fixes: QTBUG-123631 Change-Id: I5078cec1774cef7b99e0735022ddb4ce84cd08df Pick-to: 6.10 6.8 6.7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickStylePlugin::unregisterTypes(): cleanup selectors from global listOliver Eftevaag2025-10-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | File selectors may have been added in QQuickStylePlugin::registerTypes(). It makes sense to clean them up when a style plugin in unloaded, otherwise the first style that was loaded will always be prioritized, even if it was unloaded later on, during runtime. This change causes tst_qquickfiledialogimpl to acutally run with all styles (except Imagine). Originally I thought da777a75f65ad101e9b0bad7c098004c0a699b41 would work by itself, but it turns out that the test would run 4 times with the same style (Basic), instead of the intended Basic, Fusion, Material and Universal styles. By cleaning up old selectors, the test will now finally run will all the different styles. This caused some of the test functions to break. The Material style is infamous for having transitions for opening and closing popups. There were a few other functions too that broke for other reasons. Fixes for those functions are also included in this patch. Change-Id: I3c350b5e72454fccedbc2579db4813d953dfbb95 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: don't set individual radii properties on rectangle SG nodeMitch Curtis2025-10-011-8/+0
| | | | | | | | | | As of 727d2350391512cb8449f9db781b4e1041a8068c this isn't necessary and turns our lovely circle into a square. Fixes: QTBUG-136958 Pick-to: 6.10 Change-Id: I96d3d8e3e2061a3a2b387bf8e35a9bcc9fd3e9ed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickStyle: Be smarter about detecting if a theme is darkOliver Eftevaag2025-09-271-1/+4
| | | | | | | | | | | | | | | | | | | | | On Windows 11, the colorScheme is 'Unknown' when a contrast theme is applied. This is because contrast themes are seperate to the classic light/dark mode settings, but share the similarity that they both determine palette colors. Some of our QQC2 themes provide their own colors (like the Basic style, and FluentWinUI3 style). These styles provide different colors depending on whether they think the system is in dark mode or not. However, since the colorScheme can be 'Unknown', and officially still have a dark-ish system palette, we need to be a little more intelligent. Also consider the system to be in "dark mode", in cases where the colorScheme is 'Unknown' and the windowText is brighter than the window palette color roles. Task-number: QTBUG-140507 Pick-to: 6.10 Change-Id: I179ce77104f0d682f353aec10d0f7f28660668b7 Reviewed-by: Doris Verria <doris.verria@qt.io>
* FluentWinUI3: Fix text color of RoundButton for high contrast themesOliver Eftevaag2025-09-231-0/+8
| | | | | | | | | | | | | The RoundButton was overlooked in 34c542aba10113440b84dca05994987e27cb8bcf when we originally fixed Button and DelayButton. It makes sense that RoundButton gets the same treatment. Fixes: QTBUG-129088 Pick-to: 6.10 Change-Id: I55110440794ac229cbc755e8fc00373097fdf058 Reviewed-by: Benedikte Holm <benedikte.holm@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* mac style: update Slider and RangeSliderRichard Moe Gustavsen2025-09-234-44/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS Tahoe 26, the drawing of a Slider and RangeSlider using the mac style is broken. Nothing is drawn if we continue to use [NSView drawRect:], [NSView bitmapImageRepForCachingDisplayInRect:] or [CALayer renderInContext:] (and similar API) for drawing those controls, most likely since the handle has a liquid glass effect. This patch will therefore draw the mentioned controls using QML instead. The sliders and the switch used to share the same SwitchHandle.qml for drawing the handle, but their appearance has changed too much to justify that. So this patch will also add a new SliderHandle.qml that only Slider and RangeSlider will share. This handle will also mimic a liquid glass effect when running in an app with liquid glass enabled. As it stood, we also used to draw a Slider and a RangeSlider differently since there is no native RangeSlider in AppKit. To instead keep them aligned visually, and to also keep the code complexity down, we now always draw the Slider using QML, even when not running with liquid glass. Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-138946 Task-number: QTBUG-138942 Change-Id: I21397268d6f62cbc8cd2ca24f81b63e5c80d1815 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Set explicit default security level of all files with default securityJan Arve Sæther2025-09-17628-0/+628
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mac style: fall back to draw ProgressBar manually on macOS Tahoe 26Richard Moe Gustavsen2025-09-091-3/+89
| | | | | | | | | | | | | | | | | | On macOS Tahoe 26, the drawing of a ProgressBar using the mac style is broken. Nothing is drawn if we continue to use [NSView drawRect:], [NSView bitmapImageRepForCachingDisplayInRect:] or [CALayer renderInContext:] (and similar API) for drawing an NSProgressIndicator. This patch will therefore implement a fall back approach where we draw the ProgressBar manually when we detect that the current version of macOS is running with liquid glass support. Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-138947 Task-number: QTBUG-138942 Change-Id: I26faea6e24d48bf0cb7bf2cd2b114d6ca2c2825f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fusion: give TextArea a backgroundMitch Curtis2025-09-094-26/+42
| | | | | | | | | | | | | This is the same background as TextField. This will cause the implicitWidth for TextArea to be the same as TextField - i.e. a bit wider - whereas before it was only as wide as the text + padding. This fixes it not being visible, especially without placeholder text. Fixes: QTBUG-139715 Pick-to: 6.9 6.10 Change-Id: Ia736c2e282497f0a40bf8726adcc2838082ea5b4 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Fusion: Add missing revision to SearchFieldUlf Hermann2025-09-051-0/+3
| | | | | | | | Found during API review. Pick-to: 6.10 Change-Id: Ibac11d84f2adb2a8d051cdbbb5540bf2a54dbb59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickControls: Add revision to new property of FusionUlf Hermann2025-09-051-2/+2
| | | | | | | | | Found during API review. Pick-to: 6.10 Change-Id: I5bf0afacfb00d21b706890206169db8bbed335db Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion ScrollBar: Use stronger colors in high contrast modeOliver Eftevaag2025-08-301-1/+6
| | | | | | | | | | | | The ScrollBar's handle would either use palette.dark or palette.mid. Using the outline colors instead should create more contrast between the background and the ScrollBar's handle, which is what we want for high contrast mode. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: I3527f57f498415463016e3c8ec42b6081922a688 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* FluentWinUI3: Improve RadioButton when using high contrast themesOliver Eftevaag2025-08-281-4/+28
| | | | | | | | | | | | | | | | | | | The RadioButton's indicator would not use the same colors as the WinUI3 RadioButton for users that had enabled a high contrast theme. The indicator background is normally a ColorImage. But for high contrast themes we prefer to keep things simple, and draw simple colors on top of the image. It is possible to change the binding on the ColorImage to use desired high contrast theme colors from the palette, but doing so will slightly alter the colors used, due to blending with the pixel values from the underlying png image used by ColorImage. Thus we put a rectangle on top, so that high contrast themes become independent from it. Task-number: QTBUG-129088 Pick-to: 6.10 Change-Id: I57ef286584f7df2c26bacbc0bc9f3bcb7a1a64cd Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* FluentWinUI3: Improve CheckBox when using high contrast themesOliver Eftevaag2025-08-281-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | The CheckBox indicator uses a ColorImage to blend the pixels of a png image file together with a QColor, in order to determine the colors that the indicator should use in any given state (e.g, checked, unchecked, hovered, etc). Unfortunately, blending the ColorImage with a color has its limitations when enabling a high contrast theme on Windows 11, such as when the checkbox is in the pressed and unchecked state, where the color image background will typically be mostly black, and this make the color bound on the color property much darker, or in this case, completely black. To get around this issue, we now have a Rectangle on top of the ColorImage, which is normally transparent, except for when high contrast is enabled. In that case, it will be rendered on top, and use the exact desired colors. Pick-to: 6.10 Task-number: QTBUG-129088 Change-Id: Ic65218d3759495611772f010c86a85109faaaadd Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Fusion Dialog [ButtonBox]: Add strong outline for high contrast modeOliver Eftevaag2025-08-272-13/+29
| | | | | | | | | | | The DialogButtonBox lacked an outline, which it should probably have, when a high contrast setting is enabled. The Dialog had a subtle outline, which we can make stronger. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: I56a9032161c6fe7d21d0e1d4ccdd1edbdc8bfb70 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion SplitView: Give the handle more contrast in high contrast modeOliver Eftevaag2025-08-261-2/+8
| | | | | | | | | | | The handle was using palette colors such as midlight, mid and dark. We probably want to use more polarizing colors, for better contrast between the background and the handle. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: I79e2b5ba4750da2d662d815480a1ecc4923f37db Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion RadioButton indicator: Improve contrast in high contrast modeOliver Eftevaag2025-08-261-0/+2
| | | | | | | | | | | | | | | The indicator's outer border has an somewhat arbitrary value that's calculated from the palette.window color. This border looks more subtle than most of the other controls outlines. If the system is running in high contrast mode, let's use the standard outline color instead for consistency and more contrast between the background and the indicator. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: Ifcd82a24f3d763f34a4c8ae386f05fb6c05d175f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* FluentWinUI3: Improve Slider and RangeSlider with high contrast themesOliver Eftevaag2025-08-262-22/+135
| | | | | | | | | | | | | | | The Slider and RangeSlider wasn't using the correct colors, for users that had enabled a high contrast theme. They also relied on StyleImages for both the backgrounds and the handles. Use basic Rectangles instead of StyleImages when using a high contrast theme, with the appropriate colors, in order to make the control look as similar as possible to the native WinUI 3 controls. Task-number: QTBUG-129088 Pick-to: 6.10 Change-Id: Ib30a10c15124ab444b9ca4dd501d6e2c75478fcc Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Fusion: Give the Tumbler an outline in high contrast modeOliver Eftevaag2025-08-261-0/+7
| | | | | | | | | | | The Tumbler previously didn't have a background. Now it's a simple transparent Rectangle, with a border in case a high contrast system setting is enabled. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: Idc6eb43795e0ce1128f19ad5e95ad618a18ae65c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion Popup: Give the border more contrast in high contrast modeOliver Eftevaag2025-08-261-1/+1
| | | | | | | Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: I12a8051997113c37a7d700438be783f5af28c594 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion ProgressBar: Make the border more noticable in high contrast modeOliver Eftevaag2025-08-261-1/+1
| | | | | | | | | | | | In dark mode, the ProgressBar's contentItem would have a dark border, while the background's border would be light. I think it looks better when the border has a consistent color. Use Fusion.outline to achieve this in high contrast mode. Task-number: QTBUG-134971 Pick-to: 6.10 Change-Id: Id79bd34fa1a9a2e3303cefd3b1253375e70a06f0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>