mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 18:55:55 +08:00
Merge pull request #13982 from Ultimaker/CURA-9347_part_II
[CURA-9347] part deux: always warn & better outline buttons
This commit is contained in:
commit
0610078d87
@ -53,6 +53,7 @@ Item
|
|||||||
onClicked: menu.opened ? menu.close() : menu.open()
|
onClicked: menu.opened ? menu.close() : menu.open()
|
||||||
|
|
||||||
anchors.right: profileWarningReset.left
|
anchors.right: profileWarningReset.left
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("narrow_margin").width
|
||||||
width: UM.Theme.getSize("print_setup_big_item").width - profileWarningReset.width
|
width: UM.Theme.getSize("print_setup_big_item").width - profileWarningReset.width
|
||||||
height: textLabel.contentHeight + 2 * UM.Theme.getSize("narrow_margin").height
|
height: textLabel.contentHeight + 2 * UM.Theme.getSize("narrow_margin").height
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@ -157,6 +158,7 @@ Item
|
|||||||
id: profileWarningReset
|
id: profileWarningReset
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
fullWarning: false
|
fullWarning: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,18 +233,19 @@ Popup
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
height: textLabel.contentHeight + 2 * UM.Theme.getSize("narrow_margin").height
|
height: textLabel.contentHeight + UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: parent.height
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
id: textLabel
|
id: textLabel
|
||||||
text: manageProfilesButton.text
|
text: manageProfilesButton.text
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
@ -252,6 +253,7 @@ Popup
|
|||||||
text: Cura.Actions.manageProfiles.shortcut
|
text: Cura.Actions.manageProfiles.shortcut
|
||||||
color: UM.Theme.getColor("text_lighter")
|
color: UM.Theme.getColor("text_lighter")
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
@ -266,7 +268,7 @@ Popup
|
|||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
width: 2
|
width: 2
|
||||||
height: UM.Theme.getSize("default_radius").width
|
height: UM.Theme.getSize("default_radius").width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,13 +13,13 @@ Item
|
|||||||
property bool fullWarning: true // <- Can you see the warning icon and the text, or is it just the buttons?
|
property bool fullWarning: true // <- Can you see the warning icon and the text, or is it just the buttons?
|
||||||
|
|
||||||
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
|
visible: Cura.MachineManager.hasUserSettings || Cura.MachineManager.hasCustomQuality
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: warningIcon
|
id: warningIcon
|
||||||
visible: fullWarning
|
visible: fullWarning
|
||||||
color: UM.Theme.getColor("um_yellow_5")
|
color: UM.Theme.getColor("warning")
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: UM.Theme.getSize("action_button_icon").height
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
radius: width
|
radius: width
|
||||||
@ -30,6 +30,7 @@ Item
|
|||||||
}
|
}
|
||||||
UM.ColorImage
|
UM.ColorImage
|
||||||
{
|
{
|
||||||
|
id: warningIconImage
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: UM.Theme.getSize("action_button_icon").height
|
||||||
width: height
|
width: height
|
||||||
source: UM.Theme.getIcon("Warning", "low")
|
source: UM.Theme.getIcon("Warning", "low")
|
||||||
@ -54,7 +55,7 @@ Item
|
|||||||
State
|
State
|
||||||
{
|
{
|
||||||
name: "settings changed and custom quality"
|
name: "settings changed and custom quality"
|
||||||
when: Cura.SimpleModeSettingsManager.isProfileCustomized && Cura.MachineManager.hasCustomQuality
|
when: Cura.MachineManager.hasUserSettings && Cura.MachineManager.hasCustomQuality
|
||||||
PropertyChanges
|
PropertyChanges
|
||||||
{
|
{
|
||||||
target: warning
|
target: warning
|
||||||
@ -63,7 +64,6 @@ Item
|
|||||||
return catalog.i18nc("@info, %1 is the name of the custom profile", "<b>%1</b> custom profile is active and you overwrote some settings.").arg(profile_name)
|
return catalog.i18nc("@info, %1 is the name of the custom profile", "<b>%1</b> custom profile is active and you overwrote some settings.").arg(profile_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
State
|
State
|
||||||
{
|
{
|
||||||
@ -80,7 +80,21 @@ Item
|
|||||||
},
|
},
|
||||||
State
|
State
|
||||||
{
|
{
|
||||||
name: "settings changed"
|
name: "recommended settings changed"
|
||||||
|
when: Cura.MachineManager.hasUserSettings
|
||||||
|
PropertyChanges
|
||||||
|
{
|
||||||
|
target: warning
|
||||||
|
text:
|
||||||
|
{
|
||||||
|
var profile_name = Cura.MachineManager.activeQualityOrQualityChangesName;
|
||||||
|
return catalog.i18nc("@info %1 is the name of a profile", "Recommended settings (for <b>%1</b>) were altered.").arg(profile_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State
|
||||||
|
{
|
||||||
|
name: "custom settings changed"
|
||||||
when: Cura.SimpleModeSettingsManager.isProfileCustomized
|
when: Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||||
PropertyChanges
|
PropertyChanges
|
||||||
{
|
{
|
||||||
@ -110,7 +124,7 @@ 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.MachineManager.hasCustomQuality || Cura.MachineManager.hasUserSettings
|
||||||
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
|
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
|
||||||
|
|
||||||
UM.ToolTip
|
UM.ToolTip
|
||||||
@ -126,7 +140,7 @@ Item
|
|||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: buttonsSpacer
|
id: buttonsSpacer
|
||||||
width: UM.Theme.getSize("action_button_icon").height
|
width: UM.Theme.getSize("default_margin").width
|
||||||
anchors.right: compareAndSaveButton.left
|
anchors.right: compareAndSaveButton.left
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +159,7 @@ 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.hasUserSettings
|
||||||
onClicked: CuraApplication.showCompareAndSaveProfileChanges
|
onClicked: CuraApplication.showCompareAndSaveProfileChanges
|
||||||
(
|
(
|
||||||
Cura.MachineManager.hasCustomQuality ?
|
Cura.MachineManager.hasCustomQuality ?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user