Feature: new selectors
This commit is contained in:
@@ -173,6 +173,18 @@ Item {
|
||||
color: toggleRoot.checked ? Colors.primary : Colors.muted
|
||||
opacity: toggleRoot.checked ? 1 : 0.35
|
||||
}
|
||||
// Hover-only outline, offset outside the switch itself rather than
|
||||
// drawn on its edge — the switch lags behind a click until the
|
||||
// backend confirms it (e.g. the adapter's enabled state), so this
|
||||
// is just a "you can click this" cue, not click feedback.
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -4
|
||||
radius: 0
|
||||
color: "transparent"
|
||||
border.color: Colors.foreground
|
||||
border.width: toggleMouse.containsMouse ? 1 : 0
|
||||
}
|
||||
Rectangle {
|
||||
width: parent.height - 4
|
||||
height: parent.height - 4
|
||||
@@ -183,7 +195,9 @@ Item {
|
||||
Behavior on x { NumberAnimation { duration: Appearance.animationDuration } }
|
||||
}
|
||||
MouseArea {
|
||||
id: toggleMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: toggleRoot.toggled()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user