diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 338868812b..7d977f2804 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -33,6 +33,7 @@ Item property alias addMachine: addMachineAction; property alias configureMachines: settingsAction; + property alias manageProfiles: manageProfilesAction; property alias preferences: preferencesAction; @@ -101,6 +102,13 @@ Item iconName: "configure"; } + Action + { + id: manageProfilesAction; + //: manage profiles action + text: catalog.i18nc("@action","Manage Profiles"); + } + Action { id: documentationAction; diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 6b0cdf9a7c..27d7e8e53d 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -301,9 +301,9 @@ UM.MainWindow anchors { top: parent.top; - topMargin: UM.Theme.sizes.loadfile_margin.height + //topMargin: UM.Theme.sizes.loadfile_margin.height left: parent.left; - leftMargin: UM.Theme.sizes.loadfile_margin.width + //leftMargin: UM.Theme.sizes.loadfile_margin.width } action: actions.open; } @@ -393,6 +393,7 @@ UM.MainWindow addMachineAction: actions.addMachine; configureMachinesAction: actions.configureMachines; + manageProfilesAction: actions.manageProfiles; } Rectangle @@ -503,6 +504,7 @@ UM.MainWindow preferences.onTriggered: preferences.visible = true; configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(2); } + manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); } documentation.onTriggered: CuraActions.openDocumentation(); reportBug.onTriggered: CuraActions.openBugReportPage(); diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index b07ee04a63..104abe9a7d 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -12,6 +12,7 @@ Column{ id: base; UM.I18nCatalog { id: catalog; name:"cura"} property int totalHeightProfileSetup: childrenRect.height + property Action manageProfilesAction spacing: 0 Rectangle{ @@ -87,17 +88,17 @@ Column{ ToolButton { id: globalProfileSelection text: UM.MachineManager.activeProfile - width: parent.width/100*45 + width: parent.width/100*55 height: UM.Theme.sizes.setting_control.height anchors.right: parent.right - anchors.rightMargin: (UM.Theme.sizes.default_margin.width * 2) + saveProfileButton.width + anchors.rightMargin: UM.Theme.sizes.default_margin.width anchors.verticalCenter: parent.verticalCenter tooltip: UM.MachineManager.activeProfile style: UM.Theme.styles.sidebar_header_button menu: Menu { - id: machineSelectionMenu + id: profileSelectionMenu Instantiator { model: UM.ProfilesModel { } @@ -109,36 +110,42 @@ Column{ exclusiveGroup: profileSelectionMenuGroup; onTriggered: UM.MachineManager.setActiveProfile(model.name) } - onObjectAdded: machineSelectionMenu.insertItem(index, object) - onObjectRemoved: machineSelectionMenu.removeItem(object) + onObjectAdded: profileSelectionMenu.insertItem(index, object) + onObjectRemoved: profileSelectionMenu.removeItem(object) } ExclusiveGroup { id: profileSelectionMenuGroup; } - } - Button { - id: saveProfileButton - visible: true - anchors.top: parent.top - x: globalProfileSelection.width + 2 - width: parent.width/100*25 - text: catalog.i18nc("@action:button", "Save"); - height: parent.height - style: ButtonStyle { - background: Rectangle { - color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button - Behavior on color { ColorAnimation { duration: 50; } } - width: actualLabel.width + UM.Theme.sizes.default_margin.width - Label { - id: actualLabel - anchors.centerIn: parent - color: UM.Theme.colors.load_save_button_text - font: UM.Theme.fonts.default - text: control.text; - } - } - label: Item { } + MenuSeparator { } + MenuItem { + action: base.manageProfilesAction; + } } +// Button { +// id: saveProfileButton +// visible: true +// anchors.top: parent.top +// x: globalProfileSelection.width + 2 +// width: parent.width/100*25 +// text: catalog.i18nc("@action:button", "Save"); +// height: parent.height +// +// style: ButtonStyle { +// background: Rectangle { +// color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button +// Behavior on color { ColorAnimation { duration: 50; } } +// width: actualLabel.width + UM.Theme.sizes.default_margin.width +// Label { +// id: actualLabel +// anchors.centerIn: parent +// color: UM.Theme.colors.load_save_button_text +// font: UM.Theme.fonts.default +// text: control.text; +// } +// } +// label: Item { } +// } +// } } } Rectangle{ diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index d5c3c437ad..e79deaf613 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -14,6 +14,7 @@ Rectangle property Action addMachineAction; property Action configureMachinesAction; + property Action manageProfilesAction; color: UM.Theme.colors.sidebar; UM.I18nCatalog { id: catalog; name:"cura"} @@ -64,6 +65,7 @@ Rectangle ProfileSetup { id: profileItem + manageProfilesAction: base.manageProfilesAction anchors.top: header.bottom width: parent.width height: totalHeightProfileSetup