mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Move toolbox button style into theme
This commit is contained in:
parent
c2c5228eee
commit
89322b9db6
3 changed files with 59 additions and 52 deletions
|
@ -76,58 +76,9 @@ Item
|
|||
}
|
||||
enabled: installed || !(toolbox.isDownloading && toolbox.activePackage != model) //Don't allow installing while another download is running.
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
style: ButtonStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
implicitWidth: 96 * screenScaleFactor
|
||||
implicitHeight: 30 * screenScaleFactor
|
||||
color:
|
||||
{
|
||||
if (installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled")
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( control.hovered )
|
||||
{
|
||||
return UM.Theme.getColor("primary_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("primary")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
label: Label
|
||||
{
|
||||
text: control.text
|
||||
color:
|
||||
{
|
||||
if (installed)
|
||||
{
|
||||
return UM.Theme.getColor("action_button_disabled_text")
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( control.hovered )
|
||||
{
|
||||
return UM.Theme.getColor("button_text_hover")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("button_text")
|
||||
}
|
||||
}
|
||||
}
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
}
|
||||
property alias installed: tile.installed
|
||||
style: UM.Theme.styles.toolbox_action_button
|
||||
onClicked:
|
||||
{
|
||||
if (installed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue