mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Forgotten sidebar margins
The buttons need the sidebar margins too. Contributes to issue CURA-4148.
This commit is contained in:
parent
09a5cf1de2
commit
cdf43ea6a4
2 changed files with 20 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2016 Ultimaker B.V.
|
// Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the AGPLv3 or higher.
|
// Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
@ -119,10 +119,10 @@ Item
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: statusLabel
|
id: statusLabel
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
color: base.statusColor
|
color: base.statusColor
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
|
@ -177,21 +177,21 @@ Item
|
||||||
property string backgroundColor: UM.Theme.getColor("progressbar_background");
|
property string backgroundColor: UM.Theme.getColor("progressbar_background");
|
||||||
property string controlColor: base.statusColor;
|
property string controlColor: base.statusColor;
|
||||||
|
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").width;
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width;
|
||||||
height: UM.Theme.getSize("progressbar").height;
|
height: UM.Theme.getSize("progressbar").height;
|
||||||
anchors.top: statusLabel.bottom;
|
anchors.top: statusLabel.bottom;
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height / 4;
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 4;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width;
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: buttonsRow
|
id: buttonsRow
|
||||||
height: abortButton.height
|
height: abortButton.height
|
||||||
anchors.top: progressBar.bottom
|
anchors.top: progressBar.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
|
@ -45,10 +45,10 @@ Item {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: statusLabel
|
id: statusLabel
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
font: UM.Theme.getFont("default_bold")
|
font: UM.Theme.getFont("default_bold")
|
||||||
|
@ -57,12 +57,12 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: progressBar
|
id: progressBar
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
|
||||||
height: UM.Theme.getSize("progressbar").height
|
height: UM.Theme.getSize("progressbar").height
|
||||||
anchors.top: statusLabel.bottom
|
anchors.top: statusLabel.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height/4
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height/4
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
radius: UM.Theme.getSize("progressbar_radius").width
|
||||||
color: UM.Theme.getColor("progressbar_background")
|
color: UM.Theme.getColor("progressbar_background")
|
||||||
|
|
||||||
|
@ -92,14 +92,14 @@ Item {
|
||||||
width: base.width
|
width: base.width
|
||||||
height: saveToButton.height
|
height: saveToButton.height
|
||||||
anchors.top: progressBar.bottom
|
anchors.top: progressBar.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: additionalComponentsRow
|
id: additionalComponentsRow
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: saveToButton.visible ? saveToButton.left : parent.right
|
anchors.right: saveToButton.visible ? saveToButton.left : parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ Item {
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
// 1 = not started, 5 = disabled
|
// 1 = not started, 5 = disabled
|
||||||
text: [1, 5].indexOf(UM.Backend.state) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
text: [1, 5].indexOf(UM.Backend.state) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
||||||
|
@ -183,7 +183,7 @@ Item {
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2)
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
|
@ -221,7 +221,7 @@ Item {
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: deviceSelectionMenu.visible ? deviceSelectionMenu.left : parent.right
|
anchors.right: deviceSelectionMenu.visible ? deviceSelectionMenu.left : parent.right
|
||||||
anchors.rightMargin: deviceSelectionMenu.visible ? -3 * UM.Theme.getSize("default_lining").width : UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: deviceSelectionMenu.visible ? -3 * UM.Theme.getSize("default_lining").width : UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
text: UM.OutputDeviceManager.activeDeviceShortDescription
|
text: UM.OutputDeviceManager.activeDeviceShortDescription
|
||||||
onClicked:
|
onClicked:
|
||||||
|
@ -258,7 +258,7 @@ Item {
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2)
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
|
@ -288,7 +288,7 @@ Item {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
width: UM.Theme.getSize("save_button_save_to_button").height
|
width: UM.Theme.getSize("save_button_save_to_button").height
|
||||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||||
// 3 = Done, 5 = Disabled
|
// 3 = Done, 5 = Disabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue