From c62ae85b2cae30ec83974f593f8e62e8b91a1501 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 27 Jul 2026 09:20:39 +0200 Subject: [PATCH] gui: style scrollbar handle for visibility Use palette.mid at 60% opacity when active (scrolling), fully transparent when idle, palette.mid on hover, palette.highlight when pressed. 150ms color animation for smooth transitions. --- gui/ChatPane.qml | 9 +++++++++ gui/main-kf5.qml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/gui/ChatPane.qml b/gui/ChatPane.qml index 1afd68c..199eed2 100644 --- a/gui/ChatPane.qml +++ b/gui/ChatPane.qml @@ -208,7 +208,16 @@ Item { } ScrollBar.vertical: ScrollBar { + id: chatScrollBar policy: ScrollBar.AsNeeded + contentItem: Rectangle { + implicitWidth: 6 + radius: 3 + color: chatScrollBar.pressed ? palette.highlight + : chatScrollBar.hovered ? palette.mid + : Qt.rgba(palette.mid.r, palette.mid.g, palette.mid.b, chatScrollBar.active ? 0.6 : 0.0) + Behavior on color { ColorAnimation { duration: 150 } } + } } MouseArea { diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index e7731f7..a0658b6 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -1006,7 +1006,16 @@ ApplicationWindow { } ScrollBar.vertical: ScrollBar { + id: chatScrollBar policy: ScrollBar.AsNeeded + contentItem: Rectangle { + implicitWidth: 6 + radius: 3 + color: chatScrollBar.pressed ? palette.highlight + : chatScrollBar.hovered ? palette.mid + : Qt.rgba(palette.mid.r, palette.mid.g, palette.mid.b, chatScrollBar.active ? 0.6 : 0.0) + Behavior on color { ColorAnimation { duration: 150 } } + } } MouseArea {