mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-25 15:48:16 +08:00
Merge remote-tracking branch 'origin/3.6'
This commit is contained in:
commit
c27713c88a
@ -845,6 +845,7 @@ class Toolbox(QObject, Extension):
|
|||||||
def buildMaterialsModels(self) -> None:
|
def buildMaterialsModels(self) -> None:
|
||||||
self._metadata["materials_showcase"] = []
|
self._metadata["materials_showcase"] = []
|
||||||
self._metadata["materials_available"] = []
|
self._metadata["materials_available"] = []
|
||||||
|
self._metadata["materials_generic"] = []
|
||||||
|
|
||||||
processed_authors = [] # type: List[str]
|
processed_authors = [] # type: List[str]
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ Item {
|
|||||||
id: root;
|
id: root;
|
||||||
property var printJob: null;
|
property var printJob: null;
|
||||||
property var running: isRunning(printJob);
|
property var running: isRunning(printJob);
|
||||||
|
property var assigned: isAssigned(printJob);
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: button;
|
id: button;
|
||||||
@ -102,7 +103,7 @@ Item {
|
|||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: {
|
enabled: {
|
||||||
if (printJob && printJob.state == "queued") {
|
if (printJob && printJob.state == "queued" && !assigned) {
|
||||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
||||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||||
}
|
}
|
||||||
@ -117,7 +118,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PrintJobContextMenuItem {
|
PrintJobContextMenuItem {
|
||||||
enabled: printJob && printJob.state == "queued";
|
enabled: printJob && !running;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
deleteConfirmationDialog.visible = true;
|
deleteConfirmationDialog.visible = true;
|
||||||
popup.close();
|
popup.close();
|
||||||
@ -210,4 +211,10 @@ Item {
|
|||||||
}
|
}
|
||||||
return ["paused", "printing", "pre_print"].indexOf(job.state) !== -1;
|
return ["paused", "printing", "pre_print"].indexOf(job.state) !== -1;
|
||||||
}
|
}
|
||||||
|
function isAssigned(job) {
|
||||||
|
if (!job) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return job.assignedPrinter ? true : false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ Item {
|
|||||||
return UM.Theme.getColor("monitor_card_background");
|
return UM.Theme.getColor("monitor_card_background");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
height: childrenRect.height;
|
height: childrenRect.height + UM.Theme.getSize("default_margin").height;
|
||||||
layer.effect: DropShadow {
|
layer.effect: DropShadow {
|
||||||
radius: root.shadowRadius;
|
radius: root.shadowRadius;
|
||||||
verticalOffset: root.shadowOffset;
|
verticalOffset: root.shadowOffset;
|
||||||
@ -46,6 +46,11 @@ Item {
|
|||||||
width: parent.width - 2 * shadowRadius;
|
width: parent.width - 2 * shadowRadius;
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
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;
|
spacing: UM.Theme.getSize("default_margin").height;
|
||||||
@ -53,7 +58,7 @@ Item {
|
|||||||
// Main card
|
// Main card
|
||||||
Item {
|
Item {
|
||||||
id: mainCard;
|
id: mainCard;
|
||||||
height: 60 * screenScaleFactor + UM.Theme.getSize("default_margin").width;
|
height: 60 * screenScaleFactor;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
||||||
// Machine icon
|
// Machine icon
|
||||||
@ -109,7 +114,7 @@ Item {
|
|||||||
id: printerInfo;
|
id: printerInfo;
|
||||||
anchors {
|
anchors {
|
||||||
left: machineIcon.right;
|
left: machineIcon.right;
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width;
|
leftMargin: UM.Theme.getSize("wide_margin").width;
|
||||||
right: collapseIcon.left;
|
right: collapseIcon.left;
|
||||||
verticalCenter: machineIcon.verticalCenter;
|
verticalCenter: machineIcon.verticalCenter;
|
||||||
}
|
}
|
||||||
@ -250,11 +255,16 @@ Item {
|
|||||||
iconSource: "../svg/camera-icon.svg";
|
iconSource: "../svg/camera-icon.svg";
|
||||||
visible: root.printer && root.printJob;
|
visible: root.printer && root.printJob;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Progress bar
|
// Progress bar
|
||||||
PrinterCardProgressBar {
|
PrinterCardProgressBar {
|
||||||
visible: printer && printer.activePrintJob != null;
|
anchors {
|
||||||
|
top: cardContents.bottom;
|
||||||
|
topMargin: UM.Theme.getSize("default_margin").height;
|
||||||
}
|
}
|
||||||
|
visible: printer && printer.activePrintJob != null;
|
||||||
|
width: parent.width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@
|
|||||||
"website": "http://fiberlogy.com/en/fiberlogy-filaments/filament-hd-pla/",
|
"website": "http://fiberlogy.com/en/fiberlogy-filaments/filament-hd-pla/",
|
||||||
"author": {
|
"author": {
|
||||||
"author_id": "Fiberlogy",
|
"author_id": "Fiberlogy",
|
||||||
"diplay_name": "Fiberlogy S.A.",
|
"display_name": "Fiberlogy S.A.",
|
||||||
"email": "grzegorz.h@fiberlogy.com",
|
"email": "grzegorz.h@fiberlogy.com",
|
||||||
"website": "http://fiberlogy.com"
|
"website": "http://fiberlogy.com"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user