mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Add hover effect to mode switch control
While simplifying theme additions
This commit is contained in:
parent
98aca20197
commit
0c6a5328c8
3 changed files with 41 additions and 20 deletions
|
@ -412,7 +412,7 @@ Rectangle
|
|||
{
|
||||
id: toggleLeftText
|
||||
anchors.right: modeToggleSwitch.left
|
||||
anchors.rightMargin: UM.Theme.getSize("toggle_button_text_anchoring_margin").width
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: ""
|
||||
color: UM.Theme.getColor("toggle_active_text")
|
||||
|
@ -438,9 +438,19 @@ Rectangle
|
|||
id: modeToggleSwitch
|
||||
checked: false
|
||||
anchors.right: toggleRightText.left
|
||||
anchors.rightMargin: UM.Theme.getSize("toggle_button_text_anchoring_margin").width
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
property alias _hovered: enableSupportMouseArea.containsMouse
|
||||
|
||||
MouseArea
|
||||
{
|
||||
id: enableSupportMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.NoButton
|
||||
}
|
||||
|
||||
onClicked:
|
||||
{
|
||||
var index = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue