Some spacing / anchoring fixes

CL-896
This commit is contained in:
Jaime van Kessel 2018-08-24 13:41:33 +02:00
parent 3e623a6fe6
commit c13f252193
2 changed files with 23 additions and 17 deletions

View file

@ -19,7 +19,7 @@ Component
property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme.
visible: OutputDevice != null
anchors.fill: parent
color: UM.Theme.getColor("viewport_background")
color: "white"
UM.I18nCatalog
{
@ -29,11 +29,12 @@ Component
Label
{
id: activePrintersLabel
id: printingLabel
font: UM.Theme.getFont("large")
anchors
{
margins: UM.Theme.getSize("default_margin").width
margins: 2 * UM.Theme.getSize("default_margin").width
leftMargin: 4 * UM.Theme.getSize("default_margin").width
top: parent.top
left: parent.left
right: parent.right
@ -48,10 +49,10 @@ Component
{
anchors
{
top: activePrintersLabel.bottom
top: printingLabel.bottom
left: parent.left
right: parent.right
topMargin: UM.Theme.getSize("default_margin").height
topMargin: 2 * UM.Theme.getSize("default_margin").height
bottom: parent.bottom
bottomMargin: UM.Theme.getSize("default_margin").height
}
@ -172,7 +173,7 @@ Component
{
id: topSpacer
color: UM.Theme.getColor("viewport_background")
height: 1
height: 2
anchors
{
left: parent.left
@ -214,7 +215,7 @@ Component
{
id: jobSpacer
color: UM.Theme.getColor("viewport_background")
height: 1
height: 2
anchors
{
left: parent.left
@ -257,7 +258,7 @@ Component
source: modelData.activePrintJob != null ? modelData.activePrintJob.preview_image_url : ""
anchors.top: ownerName.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width / 3
width: parent.width / 2
height: width
}
@ -268,7 +269,7 @@ Component
height: width
radius: 0.5 * width
anchors.left: parent.left
anchors.top: printJobPreview.bottom
anchors.bottom: printJobPreview.bottom
color: UM.Theme.getColor("setting_control_border_highlight")
Image
{

View file

@ -77,7 +77,7 @@ Item
source: printJob.preview_image_url
anchors.top: ownerName.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: totalTimeLabel.top
anchors.bottom: totalTimeLabel.bottom
width: height
}
@ -186,7 +186,11 @@ Item
{
id: sendToTopButton
text: catalog.i18nc("@label", "Move to top")
onClicked: OutputDevice.sendJobToTop(printJob.key)
onClicked:
{
OutputDevice.sendJobToTop(printJob.key)
popup.close()
}
width: parent.width
enabled: OutputDevice.printJobs[0].key != printJob.key
anchors.top: parent.top
@ -198,12 +202,16 @@ Item
color: UM.Theme.getColor("viewport_background")
}
}
Button
{
id: deleteButton
text: catalog.i18nc("@label", "Delete")
onClicked: OutputDevice.deleteJobFromQueue(printJob.key)
onClicked:
{
OutputDevice.deleteJobFromQueue(printJob.key)
popup.close()
}
width: parent.width
anchors.top: sendToTopButton.bottom
hoverEnabled: true
@ -312,14 +320,11 @@ Item
Rectangle
{
color: UM.Theme.getColor("viewport_background")
width: 1
width: 2
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter
}
}
}