mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
Merge pull request #14283 from ctrlaltdavid/M14836
Make tablet page indicators clickable to scroll tablet
This commit is contained in:
commit
e5114c9b43
1 changed files with 15 additions and 3 deletions
|
@ -251,17 +251,29 @@ Item {
|
||||||
height: 15
|
height: 15
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
property bool isHovered: false
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
opacity: index === pageIndicator.currentIndex ? 0.95 : 0.45
|
opacity: index === pageIndicator.currentIndex || isHovered ? 0.95 : 0.45
|
||||||
implicitWidth: index === pageIndicator.currentIndex ? 15 : 10
|
implicitWidth: index === pageIndicator.currentIndex || isHovered ? 15 : 10
|
||||||
implicitHeight: implicitWidth
|
implicitHeight: implicitWidth
|
||||||
radius: width/2
|
radius: width/2
|
||||||
color: "white"
|
color: isHovered && index !== pageIndicator.currentIndex ? "#1fc6a6" : "white"
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
duration: 100
|
duration: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: 20
|
||||||
|
height: 30 // Make it easier to target with laser.
|
||||||
|
hoverEnabled: true
|
||||||
|
enabled: true
|
||||||
|
onEntered: parent.isHovered = true;
|
||||||
|
onExited: parent.isHovered = false;
|
||||||
|
onClicked: swipeView.currentIndex = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue