diff options
| author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2025-08-12 15:51:15 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-08-31 14:31:51 +0000 |
| commit | f26730325c9b68e6db12cee80571bd34e870169b (patch) | |
| tree | 4ba05877ebf5047033bbd023e07281ed962afd53 | |
| parent | e5f4aa242c9ca223fbb200faae215f8dcc64e5b8 (diff) | |
Fusion SplitView: Give the handle more contrast in high contrast mode
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
Change-Id: I79e2b5ba4750da2d662d815480a1ecc4923f37db
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 2c349258ffe2793fbe0f0196dd9b22190e49af13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| -rw-r--r-- | src/quickcontrols/fusion/SplitView.qml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quickcontrols/fusion/SplitView.qml b/src/quickcontrols/fusion/SplitView.qml index 1046d800eb..449da1f1f5 100644 --- a/src/quickcontrols/fusion/SplitView.qml +++ b/src/quickcontrols/fusion/SplitView.qml @@ -16,7 +16,13 @@ T.SplitView { handle: Rectangle { implicitWidth: control.orientation === Qt.Horizontal ? 2 : control.width implicitHeight: control.orientation === Qt.Horizontal ? control.height : 2 - color: T.SplitHandle.pressed ? control.palette.dark - : (enabled && T.SplitHandle.hovered ? control.palette.midlight : control.palette.mid) + color: { + if (Fusion.highContrast) + return T.SplitHandle.pressed ? Fusion.highlightedOutline(control.palette) + : (enabled && T.SplitHandle.hovered ? control.palette.button : Fusion.outline(control.palette)); + else + return T.SplitHandle.pressed ? control.palette.dark + : (enabled && T.SplitHandle.hovered ? control.palette.midlight : control.palette.mid) + } } } |
