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:
parent
2b17e861be
commit
c62ae85b2c
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Reference in New Issue