hover cursor changes
This commit is contained in:
parent
0f7dbb8041
commit
cda3334296
2 changed files with 14 additions and 5 deletions
|
|
@ -7,6 +7,10 @@ Slider {
|
||||||
|
|
||||||
height: 24
|
height: 24
|
||||||
|
|
||||||
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
x: control.leftPadding
|
x: control.leftPadding
|
||||||
y: control.topPadding + control.availableHeight / 2 - height / 2
|
y: control.topPadding + control.availableHeight / 2 - height / 2
|
||||||
|
|
@ -18,12 +22,12 @@ Slider {
|
||||||
color: Theme.palette.base100
|
color: Theme.palette.base100
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: control.visualPosition * parent.width
|
width: control.visualPosition * parent.width
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 75
|
duration: 75
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: Theme.palette.primary
|
color: Theme.palette.primary
|
||||||
radius: 8
|
radius: 8
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ import QtQuick.Controls
|
||||||
|
|
||||||
Switch {
|
Switch {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
|
HoverHandler {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
}
|
||||||
|
|
||||||
indicator: Item {
|
indicator: Item {
|
||||||
implicitWidth: 48
|
implicitWidth: 48
|
||||||
implicitHeight: 22
|
implicitHeight: 22
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue