aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/macos/impl
Commit message (Collapse)AuthorAgeFilesLines
* Context menus: rename control to editorMitch Curtis2025-11-121-6/+6
| | | | | | | | | | | | | | 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>
* 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>
* mac style: update Slider and RangeSliderRichard Moe Gustavsen2025-09-232-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-179-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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-052-14/+26
| | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Prevent creation of private modules without private headersAlexandru Croitor2025-04-071-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. Amends e053cefe0894ef253764ce4a0771a9058c693e7b Task-number: QTBUG-132526 Change-Id: I16caacdbe2af297a1a8c980725b542dd20080041 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* ContextMenu: add to text editing controlsMitch Curtis2025-02-287-0/+82
| | | | | | | | | | | [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>
* Set PAST_MAJOR_VERSIONS to 2 in macOS and Windows' impl modulesMitch Curtis2024-11-121-1/+1
| | | | | | | | | | | This is in line with the PAST_MAJOR_VERSIONS of the public modules and avoids duplicate entries in qmldirs, which cause issues in Design Studio. Fixes: QTBUG-130524 Pick-to: 6.5 6.8 Change-Id: I87e1b0d3ea6944851e4882601c15c2cf8ff4180c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Controls: replace Qt.styleHints with Application.styleHintsMitch Curtis2024-06-212-5/+5
| | | | | | | | | | | | | | 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 style: add CheckIndicatorRichard Moe Gustavsen2024-04-292-0/+22
| | | | | | | | | | | | | The macOS style is currently falling back to use a CheckIndicator from the Fusion style. This doesn't look very native on macOS. This patch will therefore implement the missing CheckIndicator for the macOS style, and try to make it look as native as possible. Change-Id: I4c0a56de3972a92e4e3791852c043f08a2006eb1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickControls: Link the impl libraries into the base modulesUlf Hermann2024-02-021-2/+1
| | | | | | | | | | | | | | | 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>
* macOS: use accent palette role in Switch and RangeSliderMitch Curtis2023-09-081-29/+10
| | | | | | | | | | | Also take the opportunity to simplify SwitchIndicator, as it seems the gradient that was there doesn't really match with all accent colors/ themes. Task-number: QTBUG-115165 Change-Id: I30b0c24db8e1ad5ab05a35b555099fd0a533c9cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* macOS: add RangeSliderMitch Curtis2023-09-082-8/+10
| | | | | | | | 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-083-0/+160
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>