Added pointer to context popup

CL-894
This commit is contained in:
Jaime van Kessel 2018-08-24 11:02:05 +02:00
parent fc83520ad9
commit 3e623a6fe6

View file

@ -181,7 +181,7 @@ Item
contentItem: Item contentItem: Item
{ {
width: popup.width - 2 * popup.padding width: popup.width - 2 * popup.padding
height: childrenRect.height height: childrenRect.height + 15
Button Button
{ {
id: sendToTopButton id: sendToTopButton
@ -189,6 +189,8 @@ 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
anchors.top: parent.top
anchors.topMargin: 10
hoverEnabled: true hoverEnabled: true
background: Rectangle background: Rectangle
{ {
@ -196,6 +198,7 @@ Item
color: UM.Theme.getColor("viewport_background") color: UM.Theme.getColor("viewport_background")
} }
} }
Button Button
{ {
id: deleteButton id: deleteButton
@ -212,18 +215,49 @@ Item
} }
} }
background: Rectangle background: Item
{ {
color: UM.Theme.getColor("setting_control") width: popup.width
height: popup.height - 10 // - 2 times the radius of the dropshadow. height: popup.height
width: popup.width - 10
layer.enabled: true DropShadow
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
layer.effect: DropShadow
{ {
anchors.fill: pointedRectangle
radius: 5 radius: 5
color: "#3F000000" // 25% shadow color: "#3F000000" // 25% shadow
source: pointedRectangle
transparentBorder: true
}
Item
{
id: pointedRectangle
width: parent.width -10
height: parent.height -10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Rectangle
{
id: point
height: 13
width: 13
color: UM.Theme.getColor("setting_control")
transform: Rotation { angle: 45}
anchors.right: bloop.right
y: 1
}
Rectangle
{
id: bloop
color: UM.Theme.getColor("setting_control")
width: parent.width
anchors.top: parent.top
anchors.topMargin: 10
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
}
} }
} }