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.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").height anchors.rightMargin: UM.Theme.getSize("default_margin").height
height: 125 * screenScaleFactor height: 175 * screenScaleFactor
} }
} }
} }

View File

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