mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Don't show camera icon unless printer details are expanded
Contributes to CL-1063
This commit is contained in:
parent
a5c2a73487
commit
1ba8eff7fa
2 changed files with 23 additions and 46 deletions
|
@ -36,7 +36,7 @@ Item {
|
||||||
return UM.Theme.getColor("monitor_card_background");
|
return UM.Theme.getColor("monitor_card_background");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height;
|
height: childrenRect.height;
|
||||||
layer.effect: DropShadow {
|
layer.effect: DropShadow {
|
||||||
radius: root.shadowRadius;
|
radius: root.shadowRadius;
|
||||||
verticalOffset: root.shadowOffset;
|
verticalOffset: root.shadowOffset;
|
||||||
|
@ -47,29 +47,25 @@ Item {
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: cardContents;
|
id: cardContents;
|
||||||
anchors {
|
|
||||||
top: parent.top;
|
|
||||||
topMargin: UM.Theme.getSize("default_margin").height;
|
|
||||||
}
|
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
spacing: UM.Theme.getSize("default_margin").height;
|
|
||||||
|
|
||||||
// Main card
|
// Main card
|
||||||
Item {
|
Item {
|
||||||
id: mainCard;
|
id: mainCard;
|
||||||
height: 60 * screenScaleFactor;
|
anchors {
|
||||||
|
left: parent.left;
|
||||||
|
leftMargin: UM.Theme.getSize("default_margin").width;
|
||||||
|
right: parent.right;
|
||||||
|
rightMargin: UM.Theme.getSize("default_margin").width;
|
||||||
|
}
|
||||||
|
height: 60 * screenScaleFactor + 2 * UM.Theme.getSize("default_margin").height;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
||||||
// Machine icon
|
// Machine icon
|
||||||
Item {
|
Item {
|
||||||
id: machineIcon;
|
id: machineIcon;
|
||||||
anchors {
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
leftMargin: UM.Theme.getSize("wide_margin").width;
|
|
||||||
top: parent.top;
|
|
||||||
left: parent.left;
|
|
||||||
margins: UM.Theme.getSize("default_margin").width;
|
|
||||||
}
|
|
||||||
height: parent.height - 2 * UM.Theme.getSize("default_margin").width;
|
height: parent.height - 2 * UM.Theme.getSize("default_margin").width;
|
||||||
width: height;
|
width: height;
|
||||||
|
|
||||||
|
@ -228,17 +224,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HorizontalLine {
|
|
||||||
anchors {
|
|
||||||
left: parent.left;
|
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width;
|
|
||||||
right: parent.right;
|
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width;
|
|
||||||
}
|
|
||||||
visible: root.printer;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Detailed card
|
// Detailed card
|
||||||
PrinterCardDetails {
|
PrinterCardDetails {
|
||||||
collapsed: root.collapsed;
|
collapsed: root.collapsed;
|
||||||
|
@ -246,25 +231,11 @@ Item {
|
||||||
visible: root.printer;
|
visible: root.printer;
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraButton {
|
// Progress bar
|
||||||
id: showCameraButton;
|
PrinterCardProgressBar {
|
||||||
anchors {
|
visible: printer && printer.activePrintJob != null;
|
||||||
left: parent.left;
|
width: parent.width;
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width;
|
|
||||||
}
|
|
||||||
iconSource: "../svg/camera-icon.svg";
|
|
||||||
visible: root.printer && root.printJob;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Progress bar
|
|
||||||
PrinterCardProgressBar {
|
|
||||||
anchors {
|
|
||||||
top: cardContents.bottom;
|
|
||||||
topMargin: UM.Theme.getSize("default_margin").height;
|
|
||||||
}
|
|
||||||
visible: printer && printer.activePrintJob != null;
|
|
||||||
width: parent.width;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,18 +28,18 @@ Item {
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width;
|
rightMargin: UM.Theme.getSize("default_margin").width;
|
||||||
}
|
}
|
||||||
height: childrenRect.height + UM.Theme.getSize("wide_margin").height;
|
height: childrenRect.height + UM.Theme.getSize("default_margin").height;
|
||||||
spacing: UM.Theme.getSize("default_margin").height;
|
spacing: UM.Theme.getSize("default_margin").height;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
||||||
|
HorizontalLine {}
|
||||||
|
|
||||||
PrinterInfoBlock {
|
PrinterInfoBlock {
|
||||||
printer: root.printer;
|
printer: root.printer;
|
||||||
printJob: root.printer ? root.printer.activePrintJob : null;
|
printJob: root.printer ? root.printer.activePrintJob : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
HorizontalLine {
|
HorizontalLine {}
|
||||||
visible: root.printJob;
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
|
@ -65,5 +65,11 @@ Item {
|
||||||
job: root.printer && root.printer.activePrintJob ? root.printer.activePrintJob : null;
|
job: root.printer && root.printer.activePrintJob ? root.printer.activePrintJob : null;
|
||||||
visible: root.printJob;
|
visible: root.printJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CameraButton {
|
||||||
|
id: showCameraButton;
|
||||||
|
iconSource: "../svg/camera-icon.svg";
|
||||||
|
visible: root.printer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue