aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/macos/impl/SwitchHandle.qml
Commit message (Collapse)AuthorAgeFilesLines
* mac style: update SwitchRichard Moe Gustavsen2025-10-081-25/+84
| | | | | | | | | | | | | | | | | | 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>
* Set explicit default security level of all files with default securityJan Arve Sæther2025-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* macOS style: Give Switch an outline when "Increase contrast" is enabledOliver Eftevaag2025-08-051-13/+23
| | | | | | | | | | | | | | | | | | | | | The Switch doesn't use any elements from the QuickNativeStyle module and thus won't automatically get an outlined pixmap to use as a background. In other words, we have to create the outline ourselves. Luckily, in 6.10, we have the necessary API to do just that. To make the Switch's look and feel be as similar to a native macOS switch as possible, we'll have to give both the background and the handle an outline. Since Rectangle renders its border inwards, I had to wrap the SwitchHandle's root Rectangle in a new, slightly larger Rectangle, which is normally invisible, unless "Increase contrast" is enabled. This was done, so that the borders for both the SwitchIndicator and the SwitchHandle will overlap, without causing the outline to look twice as thick. Pick-to: 6.10 Change-Id: Idc1f02a230894ccce4ce211ef9499c5e729d651c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Controls: replace Qt.styleHints with Application.styleHintsMitch Curtis2024-06-211-1/+1
| | | | | | | | | | | | | | As mentioned in QTBUG-95540, using the latter provides better type information for tooling, and avoids the "this property only exists on the object if Quick has been imported" issue. Replace QtQml import in Fluent style's Config.qml with QtQuick to provide access to the Application type. Fixes: QTBUG-126512 Pick-to: 6.5 6.7 6.8 Change-Id: I4aac22e54f3b522f74acafd467ce22139352c9dd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* macOS: add RangeSliderMitch Curtis2023-09-081-8/+0
| | | | | | | | Also ensure that RangeSlider warns about customization of its handles. Task-number: QTBUG-115165 Change-Id: Ia4993713e7273d0872c4538ff7d1200cad9bc7ed Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* macOS: add SwitchMitch Curtis2023-09-081-0/+35
This adds a QML-based implementation of Switch for the macOS style. Switch doesn't exist in widgets, so there is no QStyle support for this control. __isDefaultDelegate was renamed to __focusFrameRadius and turned into a qreal so that QML types can have control over the size of the focus frame radius. No QML types were using __isDefaultDelegate. Task-number: QTBUG-115165 Change-Id: I4f6c961ab809ba7c5c9bfccb3218d33316dd72c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>