Hide handles when not in use.
This commit is contained in:
@@ -8,6 +8,8 @@ import QtQuick.Controls
|
|||||||
import clide.module 1.0
|
import clide.module 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
|
||||||
readonly property color currentColor: {
|
readonly property color currentColor: {
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
return RustColors.pressed;
|
return RustColors.pressed;
|
||||||
@@ -24,11 +26,18 @@ Rectangle {
|
|||||||
color: currentColor
|
color: currentColor
|
||||||
implicitHeight: 8
|
implicitHeight: 8
|
||||||
radius: 2.5
|
radius: 2.5
|
||||||
|
opacity: root.hovered ? 1.0 : 0.0
|
||||||
|
|
||||||
// Execute these behaviors when the color is changed.
|
// Execute these behaviors when the color is changed.
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: 400
|
duration: 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
OpacityAnimator {
|
||||||
|
duration: 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user