Skip to content

Commit 85317d3

Browse files
committed
qml: add visualFocus outline to OptionSwitch
1 parent 893911d commit 85317d3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/qml/controls/OptionSwitch.qml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ Switch {
1212
background: Rectangle {
1313
radius: Math.floor(height / 2)
1414
color: root.checked ? Theme.color.orange : Theme.color.neutral4
15+
16+
Rectangle {
17+
visible: root.visualFocus
18+
anchors.fill: parent
19+
anchors.margins: -4
20+
border.width: 2
21+
border.color: Theme.color.purple
22+
radius: 9
23+
color: "transparent"
24+
}
1525
}
1626
indicator: Rectangle {
1727
property real _margin: Math.round((parent.height - height) / 2)

0 commit comments

Comments
 (0)