Updated the styling of the context hover

CL-896
This commit is contained in:
Jaime van Kessel 2018-08-23 18:05:13 +02:00
parent dab2efab7f
commit c703d15cd3
2 changed files with 28 additions and 7 deletions

View File

@ -99,7 +99,7 @@ Component
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").height
height: 125 * screenScaleFactor
height: 175 * screenScaleFactor
}
}
}

View File

@ -142,8 +142,8 @@ Item
{
id: contextButton
text: "\u22EE" //Unicode; Three stacked points.
width: 30
font.pixelSize: 25
width: 35
height: width
anchors
{
@ -158,8 +158,9 @@ Item
width: contextButton.width
height: contextButton.height
radius: 0.5 * width
color: "grey"
color: UM.Theme.getColor("viewport_background")
}
onClicked: parent.switchPopupState()
}
@ -175,7 +176,7 @@ Item
width: 200
height: contentItem.height + 2 * padding
visible: false
padding: UM.Theme.getSize("default_lining").width
transformOrigin: Popup.Top
contentItem: Item
{
@ -188,6 +189,12 @@ Item
onClicked: OutputDevice.sendJobToTop(printJob.key)
width: parent.width
enabled: OutputDevice.printJobs[0].key != printJob.key
hoverEnabled: true
background: Rectangle
{
opacity: sendToTopButton.down || sendToTopButton.hovered ? 1 : 0
color: UM.Theme.getColor("viewport_background")
}
}
Button
{
@ -196,14 +203,28 @@ Item
onClicked: OutputDevice.deleteJobFromQueue(printJob.key)
width: parent.width
anchors.top: sendToTopButton.bottom
hoverEnabled: true
background: Rectangle
{
opacity: deleteButton.down || deleteButton.hovered ? 1 : 0
color: UM.Theme.getColor("viewport_background")
}
}
}
background: Rectangle
{
color: UM.Theme.getColor("setting_control")
border.color: UM.Theme.getColor("setting_control_border")
height: popup.height
height: popup.height - 10 // - 2 times the radius of the dropshadow.
width: popup.width - 10
layer.enabled: true
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
layer.effect: DropShadow
{
radius: 5
color: "#3F000000" // 25% shadow
}
}
exit: Transition