forked from openkylin/ukui-menu
25 lines
637 B
QML
25 lines
637 B
QML
|
import QtQuick 2.0
|
||
|
import QtQuick.Controls 2.5
|
||
|
import org.ukui.menu.core 1.0
|
||
|
|
||
|
ScrollBar {
|
||
|
id: control
|
||
|
padding: (hovered || pressed) ? 3 : 5
|
||
|
property bool visual: true
|
||
|
|
||
|
Behavior on padding {
|
||
|
NumberAnimation {
|
||
|
duration: 200
|
||
|
easing.type: Easing.InOutQuad
|
||
|
}
|
||
|
}
|
||
|
|
||
|
contentItem: StyleBackground {
|
||
|
radius: width / 2
|
||
|
useStyleTransparent: false
|
||
|
paletteRole: Palette.Text
|
||
|
alpha: control.pressed ? 0.28 : control.hovered ? 0.18 : 0.10
|
||
|
opacity: ((control.policy === ScrollBar.AlwaysOn || control.size < 1.0 ) && control.visual) ? 1.0 : 0.0
|
||
|
}
|
||
|
}
|