forked from Shinonome/dots-hyprland
27 lines
716 B
QML
27 lines
716 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import qs.modules.common
|
|
import qs.modules.common.functions
|
|
|
|
ScrollBar {
|
|
id: root
|
|
|
|
policy: ScrollBar.AsNeeded
|
|
|
|
contentItem: Rectangle {
|
|
implicitWidth: 4
|
|
implicitHeight: root.visualSize
|
|
radius: width / 2
|
|
color: Appearance.colors.colOnSurfaceVariant
|
|
|
|
opacity: root.policy === ScrollBar.AlwaysOn || (root.active && root.size < 1.0) ? 0.5 : 0
|
|
Behavior on opacity {
|
|
NumberAnimation {
|
|
duration: 350
|
|
easing.type: Appearance.animation.elementMoveFast.type
|
|
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
|
}
|
|
}
|
|
}
|
|
}
|