QML Clean-up

Contributes to CL-897, CL-1051, CL-1111
This commit is contained in:
Ian Paschal 2018-10-23 15:41:56 +02:00
parent 1bd488dd6c
commit f9545a339d
4 changed files with 8 additions and 8 deletions

View file

@ -11,7 +11,7 @@ Rectangle {
property var iconSource: null; property var iconSource: null;
color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary"); // "Cura Blue" color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary"); // "Cura Blue"
height: width; height: width;
radius: 0.5 * width; radius: Math.round(0.5 * width);
width: 36 * screenScaleFactor; width: 36 * screenScaleFactor;
UM.RecolorImage { UM.RecolorImage {

View file

@ -51,7 +51,7 @@ Component {
id: queuedLabel; id: queuedLabel;
anchors { anchors {
left: queuedPrintJobs.left; left: queuedPrintJobs.left;
leftMargin: 3 * UM.Theme.getSize("default_margin").width + 5; leftMargin: 3 * UM.Theme.getSize("default_margin").width + 5 * screenScaleFactor;
top: parent.top; top: parent.top;
topMargin: 2 * UM.Theme.getSize("default_margin").height; topMargin: 2 * UM.Theme.getSize("default_margin").height;
} }
@ -119,7 +119,7 @@ Component {
printJob: modelData; printJob: modelData;
} }
model: OutputDevice.queuedPrintJobs; model: OutputDevice.queuedPrintJobs;
spacing: UM.Theme.getSize("default_margin").height - 10; // 2x the shadow radius spacing: UM.Theme.getSize("default_margin").height - 2 * UM.Theme.getSize("monitor_shadow_radius").width;
} }
} }

View file

@ -39,16 +39,16 @@ Item {
} }
color: { color: {
if(configurationChangeToggle.containsMouse) { if(configurationChangeToggle.containsMouse) {
return UM.Theme.getColor("viewport_background"); // TODO: Theme! return UM.Theme.getColor("viewport_background");
} else { } else {
return "transparent"; return "transparent";
} }
} }
height: UM.Theme.getSize("default_margin").height * 4; // TODO: Theme! height: UM.Theme.getSize("default_margin").height * 4;
width: parent.width; width: parent.width;
Rectangle { Rectangle {
color: "#e6e6e6"; // TODO: Theme! color: UM.Theme.getColor("monitor_lining_light");
height: UM.Theme.getSize("default_lining").height; height: UM.Theme.getSize("default_lining").height;
width: parent.width; width: parent.width;
} }

View file

@ -63,13 +63,13 @@ Item {
id: statusImage; id: statusImage;
anchors.centerIn: parent; anchors.centerIn: parent;
color: "black"; // TODO: Theme! color: "black"; // TODO: Theme!
height: 0.5 * parent.height; height: Math.round(0.5 * parent.height);
source: job && job.state == "error" ? "../svg/aborted-icon.svg" : ""; source: job && job.state == "error" ? "../svg/aborted-icon.svg" : "";
sourceSize { sourceSize {
height: height; height: height;
width: width; width: width;
} }
visible: source != ""; visible: source != "";
width: 0.5 * parent.width; width: Math.round(0.5 * parent.width);
} }
} }