mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:19:01 +08:00
Small stuff: Swap Icons. Tooltips. Remove reduntant entries.
part of CURA-9347
This commit is contained in:
parent
40b7233125
commit
79629e477d
@ -223,58 +223,6 @@ Popup
|
|||||||
color: borderColor
|
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
|
MenuButton
|
||||||
{
|
{
|
||||||
id: manageProfilesButton
|
id: manageProfilesButton
|
||||||
|
@ -91,10 +91,10 @@ Item
|
|||||||
|
|
||||||
UM.SimpleButton
|
UM.SimpleButton
|
||||||
{
|
{
|
||||||
id: compareAndSaveButton
|
id: resetToDefaultQualityButton
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: UM.Theme.getSize("action_button_icon").height
|
||||||
width: height
|
width: height
|
||||||
iconSource: UM.Theme.getIcon("Save")
|
iconSource: UM.Theme.getIcon("ArrowReset")
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
right: buttonsSpacer.left
|
right: buttonsSpacer.left
|
||||||
@ -104,8 +104,15 @@ Item
|
|||||||
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
||||||
hoverColor: UM.Theme.getColor("primary_hover")
|
hoverColor: UM.Theme.getColor("primary_hover")
|
||||||
|
|
||||||
enabled: Cura.SimpleModeSettingsManager.isProfileCustomized
|
enabled: Cura.MachineManager.hasCustomQuality || Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||||
onClicked: Cura.MachineManager.hasCustomQuality ? CuraApplication.discardOrKeepProfileChanges() : Cura.Actions.addProfile.trigger()
|
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
|
// Spacer
|
||||||
@ -113,15 +120,15 @@ Item
|
|||||||
{
|
{
|
||||||
id: buttonsSpacer
|
id: buttonsSpacer
|
||||||
width: UM.Theme.getSize("action_button_icon").height
|
width: UM.Theme.getSize("action_button_icon").height
|
||||||
anchors.right: resetToDefaultQualityButton.left
|
anchors.right: compareAndSaveButton.left
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.SimpleButton
|
UM.SimpleButton
|
||||||
{
|
{
|
||||||
id: resetToDefaultQualityButton
|
id: compareAndSaveButton
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: UM.Theme.getSize("action_button_icon").height
|
||||||
width: height
|
width: height
|
||||||
iconSource: UM.Theme.getIcon("ArrowReset")
|
iconSource: UM.Theme.getIcon("Save")
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
right: parent.right
|
right: parent.right
|
||||||
@ -131,7 +138,14 @@ Item
|
|||||||
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
||||||
hoverColor: UM.Theme.getColor("primary_hover")
|
hoverColor: UM.Theme.getColor("primary_hover")
|
||||||
|
|
||||||
enabled: Cura.MachineManager.hasCustomQuality || Cura.SimpleModeSettingsManager.isProfileCustomized
|
enabled: Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||||
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
|
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.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user