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.
This commit is contained in:
Levi Neely 2026-07-27 09:20:39 +02:00
parent 2b17e861be
commit c62ae85b2c
2 changed files with 18 additions and 0 deletions

View File

@ -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 {

View File

@ -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 {