mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Merge branch 'master' into feature_dark_colours_icons
CURA-4148 Resolve merge conflicts.
This commit is contained in:
commit
3fbdb27e8e
109 changed files with 614 additions and 377 deletions
|
@ -39,17 +39,20 @@ Menu
|
|||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
|
||||
onTriggered:
|
||||
{
|
||||
var material_id = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var materialId = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];
|
||||
var items = materialsModel.items;
|
||||
// materialsModel.find cannot be used because we need to look inside the metadata property of items
|
||||
for(var i in items)
|
||||
{
|
||||
if (items[i]["metadata"]["GUID"] == material_id)
|
||||
if (items[i]["metadata"]["GUID"] == materialId)
|
||||
{
|
||||
Cura.MachineManager.setActiveMaterial(items[i].id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,12 +67,15 @@ Menu
|
|||
MenuItem
|
||||
{
|
||||
text: model.name
|
||||
checkable: true;
|
||||
checked: model.id == Cura.MachineManager.activeMaterialId;
|
||||
exclusiveGroup: group;
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
|
@ -102,12 +108,15 @@ Menu
|
|||
MenuItem
|
||||
{
|
||||
text: model.name
|
||||
checkable: true;
|
||||
checked: model.id == Cura.MachineManager.activeMaterialId;
|
||||
exclusiveGroup: group;
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveMaterialIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: brandMaterialsMenu.insertItem(index, object)
|
||||
|
|
|
@ -30,12 +30,15 @@ Menu
|
|||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var hotendId = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
||||
var itemIndex = nozzleInstantiator.model.find("name", hotendId);
|
||||
if(itemIndex > -1)
|
||||
{
|
||||
Cura.MachineManager.setActiveVariant(nozzleInstantiator.model.getItem(itemIndex).id)
|
||||
Cura.MachineManager.setActiveVariant(nozzleInstantiator.model.getItem(itemIndex).id);
|
||||
}
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,11 +59,17 @@ Menu
|
|||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: model.name;
|
||||
checkable: true;
|
||||
checked: model.id == Cura.MachineManager.activeVariantId;
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.allActiveVariantIds[ExtruderManager.extruderIds[extruderIndex]]
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveVariant(model.id)
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveVariant(model.id);
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
|
|
|
@ -161,6 +161,12 @@ UM.PreferencesPage
|
|||
append({ text: "Português do Brasil", code: "ptbr" })
|
||||
append({ text: "Русский", code: "ru" })
|
||||
append({ text: "Türkçe", code: "tr" })
|
||||
|
||||
var date_object = new Date();
|
||||
if (date_object.getUTCMonth() == 8 && date_object.getUTCDate() == 19) //Only add Pirate on the 19th of September.
|
||||
{
|
||||
append({ text: "Pirate", code: "7s" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,6 +248,7 @@ Rectangle
|
|||
|
||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
anchors.left: globalProfileLabel.right
|
||||
anchors.right: parent.right
|
||||
tooltip: Cura.MachineManager.activeQualityName
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
|
|
|
@ -160,46 +160,6 @@ Column
|
|||
visible: !extruderSelectionRow.visible
|
||||
}
|
||||
|
||||
// Print core row
|
||||
Item
|
||||
{
|
||||
id: printCoreRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: printCoreLabel
|
||||
text: Cura.MachineManager.activeDefinitionVariantsName;
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
id: printCoreSelection
|
||||
text: Cura.MachineManager.activeVariantName
|
||||
tooltip: Cura.MachineManager.activeVariantName;
|
||||
visible: Cura.MachineManager.hasVariants
|
||||
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: parent.right
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
activeFocusOnPress: true;
|
||||
|
||||
menu: NozzleMenu { extruderIndex: base.currentExtruderIndex }
|
||||
}
|
||||
}
|
||||
|
||||
// Material Row
|
||||
Item
|
||||
{
|
||||
|
@ -219,7 +179,7 @@ Column
|
|||
{
|
||||
id: materialLabel
|
||||
text: catalog.i18nc("@label","Material");
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
}
|
||||
|
@ -256,6 +216,46 @@ Column
|
|||
}
|
||||
}
|
||||
|
||||
// Print core row
|
||||
Item
|
||||
{
|
||||
id: printCoreRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: printCoreLabel
|
||||
text: Cura.MachineManager.activeDefinitionVariantsName;
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
id: printCoreSelection
|
||||
text: Cura.MachineManager.activeVariantName
|
||||
tooltip: Cura.MachineManager.activeVariantName;
|
||||
visible: Cura.MachineManager.hasVariants
|
||||
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: parent.right
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
activeFocusOnPress: true;
|
||||
|
||||
menu: NozzleMenu { extruderIndex: base.currentExtruderIndex }
|
||||
}
|
||||
}
|
||||
|
||||
// Material info row
|
||||
Item
|
||||
{
|
||||
|
|
|
@ -57,8 +57,40 @@ Rectangle
|
|||
id: showMonitor
|
||||
height: UM.Theme.getSize("sidebar_header").height
|
||||
onClicked: base.startMonitoringPrint()
|
||||
text: catalog.i18nc("@title:tab", "Print")
|
||||
iconSource: UM.Theme.getIcon("tab_monitor")
|
||||
text: catalog.i18nc("@title:tab", "Monitor")
|
||||
iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor")
|
||||
property color overlayColor:
|
||||
{
|
||||
if(!printerAcceptsCommands)
|
||||
{
|
||||
return UM.Theme.getColor("status_unknown");
|
||||
}
|
||||
|
||||
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
|
||||
{
|
||||
return UM.Theme.getColor("status_busy");
|
||||
}
|
||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||
{
|
||||
case "printing":
|
||||
case "pre_print":
|
||||
case "wait_cleanup":
|
||||
case "pausing":
|
||||
case "resuming":
|
||||
return UM.Theme.getColor("status_busy");
|
||||
case "ready":
|
||||
case "":
|
||||
return UM.Theme.getColor("status_ready");
|
||||
case "paused":
|
||||
return UM.Theme.getColor("status_paused");
|
||||
case "error":
|
||||
return UM.Theme.getColor("status_stopped");
|
||||
case "offline":
|
||||
return UM.Theme.getColor("status_offline");
|
||||
default:
|
||||
return UM.Theme.getColor("text_reversed");
|
||||
}
|
||||
}
|
||||
property string overlayIconSource:
|
||||
{
|
||||
if(!printerConnected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue