mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
CURA-4870 Move the printer type and the buildplate selector to the top
of the sidebar and set them separate from the extruder related selectors.
This commit is contained in:
parent
9613103591
commit
ec2201b57c
@ -26,16 +26,111 @@ Column
|
|||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
id: initialSeparator
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
visible: extruderSelectionRow.visible
|
visible: printerTypeSelectionRow.visible || buildplateRow.visible || extruderSelectionRow.visible
|
||||||
height: UM.Theme.getSize("default_lining").height
|
height: UM.Theme.getSize("default_lining").height
|
||||||
width: height
|
width: height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Printer Type Row
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: printerTypeSelectionRow
|
||||||
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
|
visible: printerConnected && hasManyPrinterTypes && !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
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: configurationLabel
|
||||||
|
text: catalog.i18nc("@label", "Printer type");
|
||||||
|
width: Math.round(parent.width * 0.4 - UM.Theme.getSize("default_margin").width)
|
||||||
|
height: parent.height
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
font: UM.Theme.getFont("default");
|
||||||
|
color: UM.Theme.getColor("text");
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton
|
||||||
|
{
|
||||||
|
id: printerTypeSelection
|
||||||
|
text: Cura.MachineManager.activeMachineDefinitionName
|
||||||
|
tooltip: Cura.MachineManager.activeMachineDefinitionName
|
||||||
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
width: Math.round(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
|
||||||
|
anchors.right: parent.right
|
||||||
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
|
activeFocusOnPress: true;
|
||||||
|
|
||||||
|
menu: PrinterTypeMenu { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Buildplate row
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: buildplateRow
|
||||||
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
|
visible: Cura.MachineManager.hasVariantBuildplates && !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
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: bulidplateLabel
|
||||||
|
text: catalog.i18nc("@label", "Build plate");
|
||||||
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||||
|
height: parent.height
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
font: UM.Theme.getFont("default");
|
||||||
|
color: UM.Theme.getColor("text");
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
id: buildplateSelection
|
||||||
|
text: Cura.MachineManager.activeVariantBuildplateName
|
||||||
|
tooltip: Cura.MachineManager.activeVariantBuildplateName
|
||||||
|
visible: Cura.MachineManager.hasVariantBuildplates
|
||||||
|
|
||||||
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
|
||||||
|
anchors.right: parent.right
|
||||||
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
|
activeFocusOnPress: true;
|
||||||
|
|
||||||
|
menu: BuildplateMenu {}
|
||||||
|
|
||||||
|
property var valueError: !Cura.MachineManager.variantBuildplateCompatible && !Cura.MachineManager.variantBuildplateUsable
|
||||||
|
property var valueWarning: Cura.MachineManager.variantBuildplateUsable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: headerSeparator
|
||||||
|
width: parent.width
|
||||||
|
visible: printerTypeSelectionRow.visible || buildplateRow.visible
|
||||||
|
height: visible ? UM.Theme.getSize("sidebar_lining").height : 0
|
||||||
|
color: UM.Theme.getColor("sidebar_lining")
|
||||||
|
}
|
||||||
|
|
||||||
// Extruder Row
|
// Extruder Row
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -223,48 +318,7 @@ Column
|
|||||||
id: variantRowSpacer
|
id: variantRowSpacer
|
||||||
height: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
|
height: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
|
||||||
width: height
|
width: height
|
||||||
visible: !extruderSelectionRow.visible
|
visible: !extruderSelectionRow.visible && !initialSeparator.visible
|
||||||
}
|
|
||||||
|
|
||||||
// Printer Type Row
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: printerTypeSelectionRow
|
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
|
||||||
visible: printerConnected && hasManyPrinterTypes && !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
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: configurationLabel
|
|
||||||
text: catalog.i18nc("@label", "Printer type");
|
|
||||||
width: Math.round(parent.width * 0.4 - UM.Theme.getSize("default_margin").width)
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
font: UM.Theme.getFont("default");
|
|
||||||
color: UM.Theme.getColor("text");
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton
|
|
||||||
{
|
|
||||||
id: printerTypeSelection
|
|
||||||
text: Cura.MachineManager.activeMachineDefinitionName
|
|
||||||
tooltip: Cura.MachineManager.activeMachineDefinitionName
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
|
||||||
width: Math.round(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
|
|
||||||
anchors.right: parent.right
|
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
|
||||||
activeFocusOnPress: true;
|
|
||||||
|
|
||||||
menu: PrinterTypeMenu { }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Material Row
|
// Material Row
|
||||||
@ -371,64 +425,6 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Buildplate row separator
|
|
||||||
Rectangle {
|
|
||||||
id: separator
|
|
||||||
|
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
visible: buildplateRow.visible
|
|
||||||
width: parent.width - UM.Theme.getSize("sidebar_margin").width * 2
|
|
||||||
height: visible ? Math.floor(UM.Theme.getSize("sidebar_lining_thin").height / 2) : 0
|
|
||||||
color: UM.Theme.getColor("sidebar_lining_thin")
|
|
||||||
}
|
|
||||||
|
|
||||||
//Buildplate row
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: buildplateRow
|
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
|
||||||
visible: Cura.MachineManager.hasVariantBuildplates && !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
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: bulidplateLabel
|
|
||||||
text: catalog.i18nc("@label", "Build plate");
|
|
||||||
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
font: UM.Theme.getFont("default");
|
|
||||||
color: UM.Theme.getColor("text");
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton {
|
|
||||||
id: buildplateSelection
|
|
||||||
text: Cura.MachineManager.activeVariantBuildplateName
|
|
||||||
tooltip: Cura.MachineManager.activeVariantBuildplateName
|
|
||||||
visible: Cura.MachineManager.hasVariantBuildplates
|
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
|
||||||
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
|
|
||||||
anchors.right: parent.right
|
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
|
||||||
activeFocusOnPress: true;
|
|
||||||
|
|
||||||
menu: BuildplateMenu {}
|
|
||||||
|
|
||||||
property var valueError: !Cura.MachineManager.variantBuildplateCompatible && !Cura.MachineManager.variantBuildplateUsable
|
|
||||||
property var valueWarning: Cura.MachineManager.variantBuildplateUsable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Material info row
|
// Material info row
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user