Skip to content

Commit

Permalink
Make toggle button labels clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
LipuFei committed Apr 19, 2017
1 parent f0d4ea4 commit 7db0f0e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions resources/qml/Sidebar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,20 @@ Rectangle
text: ""
color: UM.Theme.getColor("toggle_active_text")
font: UM.Theme.getFont("default")

MouseArea
{
anchors.fill: parent
onClicked:
{
modeToggleSwitch.checked = false;
}

Component.onCompleted:
{
clicked.connect(modeToggleSwitch.clicked)
}
}
}

Switch
Expand Down Expand Up @@ -454,6 +468,20 @@ Rectangle
text: ""
color: UM.Theme.getColor("toggle_active_text")
font: UM.Theme.getFont("default")

MouseArea
{
anchors.fill: parent
onClicked:
{
modeToggleSwitch.checked = true;
}

Component.onCompleted:
{
clicked.connect(modeToggleSwitch.clicked)
}
}
}
}

Expand Down

0 comments on commit 7db0f0e

Please sign in to comment.