diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 1cf3910417..3757d64773 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -14,63 +14,9 @@ Item{ property int totalHeightProfileSetup: childrenRect.height property Action manageProfilesAction - Rectangle { - id: variantRow - anchors.top: base.top - width: base.width - height: UM.Theme.sizes.sidebar_setup.height - //visible: UM.MachineManager.hasVariants; - visible: true - - Label{ - id: variantLabel - text: catalog.i18nc("@label","Variant:"); - anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; - anchors.verticalCenter: parent.verticalCenter - width: parent.width/100*45 - font: UM.Theme.fonts.default; - } - - ToolButton { - id: variantSelection - text: UM.MachineManager.activeMachineVariant - width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height - tooltip: UM.MachineManager.activeMachineInstance; - anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width - anchors.verticalCenter: parent.verticalCenter - style: UM.Theme.styles.sidebar_header_button - - menu: Menu - { - id: variantsSelectionMenu - Instantiator - { - model: UM.MachineVariantsModel { id: variantsModel } - MenuItem - { - text: model.name; - checkable: true; - checked: model.active; - exclusiveGroup: variantSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) - } - onObjectAdded: variantsSelectionMenu.insertItem(index, object) - onObjectRemoved: variantsSelectionMenu.removeItem(object) - } - - ExclusiveGroup { id: variantSelectionMenuGroup; } - } - } - } - Rectangle{ - id: globalProfileRow; - anchors.top: UM.MachineManager.hasVariants ? variantRow.bottom : base.top - anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.sizes.default_lining.height : 0 - //anchors.top: variantRow.bottom + id: globalProfileRow + anchors.top: base.top height: UM.Theme.sizes.sidebar_setup.height width: base.width @@ -79,7 +25,7 @@ Item{ anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; anchors.verticalCenter: parent.verticalCenter - text: catalog.i18nc("@label","Global Profile:"); + text: catalog.i18nc("@label","Profile:"); width: parent.width/100*45 font: UM.Theme.fonts.default; color: UM.Theme.colors.text; diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 38d129c6bb..d98d4ae3c1 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -17,7 +17,7 @@ Item property int totalHeightHeader: childrenRect.height Rectangle { - id: settingsModeRow + id: sidebarTabRow width: base.width height: 0 anchors.top: parent.top @@ -29,7 +29,7 @@ Item text: catalog.i18nc("@label:listbox","Print Job"); anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.default_margin.width; - anchors.top: settingsModeRow.bottom + anchors.top: sidebarTabRow.bottom anchors.topMargin: UM.Theme.sizes.default_margin.height width: parent.width/100*45 font: UM.Theme.fonts.large; @@ -93,4 +93,57 @@ Item } } } + + Rectangle { + id: variantRow + anchors.top: machineSelectionRow.bottom + anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.sizes.default_margin.height : 0 + width: base.width + height: UM.MachineManager.hasVariants ? UM.Theme.sizes.sidebar_setup.height : 0 + visible: UM.MachineManager.hasVariants + + Label{ + id: variantLabel + text: catalog.i18nc("@label","Nozzle:"); + anchors.left: parent.left + anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.verticalCenter: parent.verticalCenter + width: parent.width/100*45 + font: UM.Theme.fonts.default; + color: UM.Theme.colors.text; + } + + ToolButton { + id: variantSelection + text: UM.MachineManager.activeMachineVariant + width: parent.width/100*55 + height: UM.Theme.sizes.setting_control.height + tooltip: UM.MachineManager.activeMachineInstance; + anchors.right: parent.right + anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.verticalCenter: parent.verticalCenter + style: UM.Theme.styles.sidebar_header_button + + menu: Menu + { + id: variantsSelectionMenu + Instantiator + { + model: UM.MachineVariantsModel { id: variantsModel } + MenuItem + { + text: model.name; + checkable: true; + checked: model.active; + exclusiveGroup: variantSelectionMenuGroup; + onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) + } + onObjectAdded: variantsSelectionMenu.insertItem(index, object) + onObjectRemoved: variantsSelectionMenu.removeItem(object) + } + + ExclusiveGroup { id: variantSelectionMenuGroup; } + } + } + } }