mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Add animation to hover effect
CURA-8421
This commit is contained in:
parent
96436fbedd
commit
e0b38f2782
1 changed files with 5 additions and 12 deletions
|
@ -15,14 +15,17 @@ Button
|
|||
property alias displayName: applicationDisplayName.text
|
||||
property alias tooltipText: tooltip.text
|
||||
property bool isExternalLink: false
|
||||
property color backgroundColor: hovered ? UM.Theme.getColor("primary") : "transparent"
|
||||
Behavior on backgroundColor { ColorAnimation { duration: 200; } }
|
||||
|
||||
|
||||
width: UM.Theme.getSize("application_switcher_item").width
|
||||
height: UM.Theme.getSize("application_switcher_item").height
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
||||
border.color: parent.hovered ? UM.Theme.getColor("primary") : "transparent"
|
||||
color: backgroundColor
|
||||
border.color: backgroundColor
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
}
|
||||
|
||||
|
@ -62,16 +65,6 @@ Button
|
|||
rightMargin: - Math.round(width * 5 / 6)
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: externalLinkIndicatorBackground
|
||||
anchors.centerIn: parent
|
||||
width: UM.Theme.getSize("icon_indicator_background").width
|
||||
height: width
|
||||
color: base.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
||||
radius: 0.5 * width
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: externalLinkIndicatorIcon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue