Small stuff: Swap Icons. Tooltips. Remove reduntant entries.

part of CURA-9347
This commit is contained in:
Remco Burema 2022-11-29 23:39:24 +01:00
parent 40b7233125
commit 79629e477d
2 changed files with 23 additions and 61 deletions

View File

@ -223,58 +223,6 @@ Popup
color: borderColor
}
MenuButton
{
labelText: Cura.Actions.addProfile.text
anchors.left: parent.left
anchors.right: parent.right
enabled: Cura.Actions.addProfile.enabled
onClicked:
{
Cura.Actions.addProfile.trigger()
popup.visible = false
}
}
MenuButton
{
labelText: Cura.Actions.updateProfile.text
anchors.left: parent.left
anchors.right: parent.right
enabled: Cura.Actions.updateProfile.enabled
onClicked:
{
popup.visible = false
Cura.Actions.updateProfile.trigger()
}
}
MenuButton
{
text: catalog.i18nc("@action:button", "Discard current changes")
anchors.left: parent.left
anchors.right: parent.right
enabled: Cura.MachineManager.hasUserSettings
onClicked:
{
popup.visible = false
Cura.ContainerManager.clearUserContainers()
}
}
Rectangle
{
height: UM.Theme.getSize("default_lining").width
anchors.left: parent.left
anchors.right: parent.right
color: borderColor
}
MenuButton
{
id: manageProfilesButton

View File

@ -91,10 +91,10 @@ Item
UM.SimpleButton
{
id: compareAndSaveButton
id: resetToDefaultQualityButton
height: UM.Theme.getSize("action_button_icon").height
width: height
iconSource: UM.Theme.getIcon("Save")
iconSource: UM.Theme.getIcon("ArrowReset")
anchors
{
right: buttonsSpacer.left
@ -104,8 +104,15 @@ Item
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
hoverColor: UM.Theme.getColor("primary_hover")
enabled: Cura.SimpleModeSettingsManager.isProfileCustomized
onClicked: Cura.MachineManager.hasCustomQuality ? CuraApplication.discardOrKeepProfileChanges() : Cura.Actions.addProfile.trigger()
enabled: Cura.MachineManager.hasCustomQuality || Cura.SimpleModeSettingsManager.isProfileCustomized
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
UM.ToolTip
{
visible: parent.hovered
targetPoint: Qt.point(parent.x - width, Math.round(parent.y + parent.height / 2))
tooltipText: catalog.i18nc("@info", "Reset to defaults.")
}
}
// Spacer
@ -113,15 +120,15 @@ Item
{
id: buttonsSpacer
width: UM.Theme.getSize("action_button_icon").height
anchors.right: resetToDefaultQualityButton.left
anchors.right: compareAndSaveButton.left
}
UM.SimpleButton
{
id: resetToDefaultQualityButton
id: compareAndSaveButton
height: UM.Theme.getSize("action_button_icon").height
width: height
iconSource: UM.Theme.getIcon("ArrowReset")
iconSource: UM.Theme.getIcon("Save")
anchors
{
right: parent.right
@ -131,7 +138,14 @@ Item
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
hoverColor: UM.Theme.getColor("primary_hover")
enabled: Cura.MachineManager.hasCustomQuality || Cura.SimpleModeSettingsManager.isProfileCustomized
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
enabled: Cura.SimpleModeSettingsManager.isProfileCustomized
onClicked: Cura.MachineManager.hasCustomQuality ? CuraApplication.discardOrKeepProfileChanges() : Cura.Actions.addProfile.trigger()
UM.ToolTip
{
visible: parent.hovered
targetPoint: Qt.point(parent.x - width, Math.round(parent.y + parent.height / 2))
tooltipText: catalog.i18nc("@info", "Compare and safe.")
}
}
}