aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/macos/impl/SliderHandle.qml
Commit message (Collapse)AuthorAgeFilesLines
* mac style: update Slider and RangeSliderRichard Moe Gustavsen2025-09-231-0/+105
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>