mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 16:09:01 +08:00
Fix the hover effect of action button
CURA-5959
This commit is contained in:
parent
e1f3e07f04
commit
af1ee53578
@ -12,7 +12,6 @@ import UM 1.1 as UM
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: button
|
id: button
|
||||||
property alias cursorShape: mouseArea.cursorShape
|
|
||||||
property alias iconSource: buttonIcon.source
|
property alias iconSource: buttonIcon.source
|
||||||
property alias textFont: buttonText.font
|
property alias textFont: buttonText.font
|
||||||
property alias cornerRadius: backgroundRect.radius
|
property alias cornerRadius: backgroundRect.radius
|
||||||
@ -22,12 +21,14 @@ Button
|
|||||||
property color hoverColor: UM.Theme.getColor("primary_hover")
|
property color hoverColor: UM.Theme.getColor("primary_hover")
|
||||||
property color disabledColor: color
|
property color disabledColor: color
|
||||||
property color textColor: UM.Theme.getColor("button_text")
|
property color textColor: UM.Theme.getColor("button_text")
|
||||||
property color textHoverColor: UM.Theme.getColor("button_text_hover")
|
property color textHoverColor: textColor
|
||||||
property color textDisabledColor: textColor
|
property color textDisabledColor: textColor
|
||||||
property color outlineColor: color
|
property color outlineColor: color
|
||||||
property color outlineHoverColor: hoverColor
|
property color outlineHoverColor: hoverColor
|
||||||
property color outlineDisabledColor: outlineColor
|
property color outlineDisabledColor: outlineColor
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
property alias shadowColor: shadow.color
|
property alias shadowColor: shadow.color
|
||||||
property alias shadowEnabled: shadow.visible
|
property alias shadowEnabled: shadow.visible
|
||||||
|
|
||||||
@ -95,13 +96,4 @@ Button
|
|||||||
delay: 500
|
delay: 500
|
||||||
visible: text != "" && button.hovered
|
visible: text != "" && button.hovered
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea
|
|
||||||
{
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
// Ensure that the button will still accept the clicks on it's own.
|
|
||||||
onPressed: mouse.accepted = false
|
|
||||||
hoverEnabled: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user