Re-added hover on showcase tiles

CURA-6013
This commit is contained in:
Jaime van Kessel 2018-12-12 11:40:51 +01:00
parent 5fd0f2b5f6
commit dbf91fca7f

View File

@ -51,12 +51,11 @@ Rectangle
UM.RecolorImage UM.RecolorImage
{ {
width: (parent.width * 0.20) | 0 width: (parent.width * 0.20) | 0
height: (parent.height * 0.20) | 0 height: width
anchors anchors
{ {
bottom: parent.bottom bottom: bottomBorder.top
right: parent.right right: parent.right
bottomMargin: UM.Theme.getSize("default_lining").width
} }
visible: installedPackages != 0 visible: installedPackages != 0
color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border") color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border")
@ -70,10 +69,21 @@ Rectangle
anchors.bottomMargin: UM.Theme.getSize("narrow_margin").height anchors.bottomMargin: UM.Theme.getSize("narrow_margin").height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
Rectangle
{
id: bottomBorder
color: UM.Theme.getColor("primary")
anchors.bottom: parent.bottom
width: parent.width
height: UM.Theme.getSize("toolbox_header_highlight").height
}
MouseArea MouseArea
{ {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true
onEntered: tileBase.border.color = UM.Theme.getColor("primary")
onExited: tileBase.border.color = UM.Theme.getColor("lining")
onClicked: onClicked:
{ {
base.selection = model base.selection = model