Merge pull request #3765 from fieldOfView/fix_toolbox_appearance

Fix toolbox appearance
This commit is contained in:
Ian Paschal 2018-05-04 14:25:01 +02:00 committed by GitHub
commit 858108920a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 93 additions and 75 deletions

View file

@ -11,7 +11,7 @@ Item
id: tile
property bool installed: toolbox.isInstalled(model.id)
width: detailList.width - UM.Theme.getSize("wide_margin").width
height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height)
height: normalData.height + compatibilityChart.height + 4 * UM.Theme.getSize("default_margin").height
Item
{
id: normalData
@ -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
implicitHeight: 30
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)