mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-28 11:03:13 +08:00
Merge pull request #11595 from Ultimaker/CURA-8928_menu_visual_fixes
Leftover menu fixes
This commit is contained in:
commit
24fc1ae2a2
@ -222,7 +222,7 @@ Item
|
|||||||
id: updateProfileAction
|
id: updateProfileAction
|
||||||
enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings && Cura.MachineManager.activeQualityChangesGroup != null
|
enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings && Cura.MachineManager.activeQualityChangesGroup != null
|
||||||
text: catalog.i18nc("@action:inmenu menubar:profile", "&Update profile with current settings/overrides");
|
text: catalog.i18nc("@action:inmenu menubar:profile", "&Update profile with current settings/overrides");
|
||||||
onTriggered: Cura.ContainerManager.updateQualityChanges();
|
onTriggered: Cura.ContainerManager.updateQualityChanges()
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
|
@ -18,15 +18,15 @@ Button
|
|||||||
property string labelText: ""
|
property string labelText: ""
|
||||||
id: button
|
id: button
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
leftPadding:UM.Theme.getSize("wide_margin").width
|
leftPadding: UM.Theme.getSize("default_margin").width
|
||||||
|
implicitWidth: UM.Theme.getSize("menu").width
|
||||||
|
implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height
|
||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: backgroundRectangle
|
height: button.height
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
width: button.width
|
||||||
border.color: button.checked ? UM.Theme.getColor("setting_control_border_highlight") : "transparent"
|
color: button.hovered ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1")
|
||||||
color: button.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent"
|
|
||||||
radius: UM.Theme.getSize("action_button_radius").width
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround to ensure that the mnemonic highlighting happens correctly
|
// Workaround to ensure that the mnemonic highlighting happens correctly
|
||||||
@ -40,11 +40,29 @@ Button
|
|||||||
return txt
|
return txt
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: UM.Label
|
contentItem: Item
|
||||||
{
|
{
|
||||||
id: textLabel
|
height: button.height
|
||||||
text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText)
|
width: button.width
|
||||||
height: contentHeight
|
UM.RecolorImage
|
||||||
color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive")
|
{
|
||||||
|
id: check
|
||||||
|
height: UM.Theme.getSize("default_arrow").height
|
||||||
|
width: height
|
||||||
|
source: UM.Theme.getIcon("Check", "low")
|
||||||
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
visible: button.checked
|
||||||
|
}
|
||||||
|
UM.Label
|
||||||
|
{
|
||||||
|
id: textLabel
|
||||||
|
text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText)
|
||||||
|
height: contentHeight
|
||||||
|
color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive")
|
||||||
|
anchors.left: check.right
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -130,6 +130,7 @@ Popup
|
|||||||
checkable: true
|
checkable: true
|
||||||
visible: model.available
|
visible: model.available
|
||||||
text: model.name + " - " + model.layer_height + " mm"
|
text: model.name + " - " + model.layer_height + " mm"
|
||||||
|
leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width
|
||||||
checked:
|
checked:
|
||||||
{
|
{
|
||||||
if (Cura.MachineManager.hasCustomQuality)
|
if (Cura.MachineManager.hasCustomQuality)
|
||||||
@ -195,6 +196,7 @@ Popup
|
|||||||
checkable: true
|
checkable: true
|
||||||
visible: model.available
|
visible: model.available
|
||||||
text: model.name
|
text: model.name
|
||||||
|
leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width
|
||||||
checked:
|
checked:
|
||||||
{
|
{
|
||||||
var active_quality_group = Cura.MachineManager.activeQualityChangesGroup
|
var active_quality_group = Cura.MachineManager.activeQualityChangesGroup
|
||||||
@ -295,13 +297,12 @@ Popup
|
|||||||
id: textLabel
|
id: textLabel
|
||||||
text: manageProfilesButton.text
|
text: manageProfilesButton.text
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width
|
|
||||||
}
|
}
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
id: shortcutLabel
|
id: shortcutLabel
|
||||||
text: Cura.Actions.manageProfiles.shortcut
|
text: Cura.Actions.manageProfiles.shortcut
|
||||||
|
color: UM.Theme.getColor("text_lighter")
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
@ -29,6 +29,7 @@ ToolTip
|
|||||||
visible: opacity != 0.0
|
visible: opacity != 0.0
|
||||||
opacity: 0.0 // initially hidden
|
opacity: 0.0 // initially hidden
|
||||||
|
|
||||||
|
|
||||||
Behavior on opacity
|
Behavior on opacity
|
||||||
{
|
{
|
||||||
NumberAnimation { duration: 100; }
|
NumberAnimation { duration: 100; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user