Fix review comments.

- Text was cutoff instead of wrapped in Save Custom Profile (Rename Dialog).
- Make the placeholder into a proper placeholder text.
- Fix spelling (save -> safe).
- Link didn't work as a link.
- Slightly better tooltips.

part of CURA-9347
This commit is contained in:
Remco Burema 2022-12-01 14:57:05 +01:00
parent 6f651b922a
commit 3bc955fe8f
4 changed files with 30 additions and 22 deletions

View file

@ -876,7 +876,7 @@ UM.MainWindow
{ {
id: createNewQualityDialog id: createNewQualityDialog
title: catalog.i18nc("@title:window", "Save Custom Profile") title: catalog.i18nc("@title:window", "Save Custom Profile")
object: catalog.i18nc("@textfield:placeholder", "<New Custom Profile>") objectPlaceholder: catalog.i18nc("@textfield:placeholder", "New Custom Profile")
explanation: catalog.i18nc("@info", "Custom profile name:") explanation: catalog.i18nc("@info", "Custom profile name:")
extraInfo: extraInfo:
[ [
@ -887,17 +887,28 @@ UM.MainWindow
source: UM.Theme.getIcon("Information") source: UM.Theme.getIcon("Information")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
}, },
UM.Label Column
{ {
text: catalog.i18nc UM.Label
( {
"@label %i will be replaced with a profile name", text: catalog.i18nc
"<b>Only user changed settings will be saved in the custom profile.</b><br/>" + (
"The new custom profile will inherit properties from <b>%1</b>,<br/>" + "@label %i will be replaced with a profile name",
"for materials that support it.<br/>" + "<b>Only user changed settings will be saved in the custom profile.</b><br/>" +
"<a href=\"%2\">Learn more about Cura print profiles</a>" "For materials that support it, the new custom profile will inherit properties from <b>%1</b>."
).arg(Cura.MachineManager.activeQualityOrQualityChangesName).arg("https://support.ultimaker.com/s/article/1667337576882") ).arg(Cura.MachineManager.activeQualityOrQualityChangesName)
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.parent.width - 2 * UM.Theme.getSize("message_type_icon").width
}
Cura.TertiaryButton
{
text: "Learn more about Cura print profiles"
iconSource: UM.Theme.getIcon("LinkExternal")
isIconOnRightSide: true
leftPadding: 0
rightPadding: 0
onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/1667337576882")
}
} }
] ]
okButtonText: catalog.i18nc("@button", "Save new profile") okButtonText: catalog.i18nc("@button", "Save new profile")

View file

@ -155,14 +155,6 @@ UM.Dialog
discardButton.enabled = true; discardButton.enabled = true;
} }
} }
},
Rectangle
{
// Workaround: If this placeholder isn't in here, then on repeated state-changes of the window, the rightButtons will be in the center (despite initially showing up right).
visible: alternateStates.state != ""
color: base.backgroundColor
implicitHeight: UM.Theme.getSize("combobox").height
implicitWidth: UM.Theme.getSize("combobox").width
} }
] ]

View file

@ -15,6 +15,7 @@ UM.Dialog
buttonSpacing: UM.Theme.getSize("default_margin").width buttonSpacing: UM.Theme.getSize("default_margin").width
property string object: "" property string object: ""
property string objectPlaceholder: ""
property alias newName: nameField.text property alias newName: nameField.text
property bool validName: true property bool validName: true
@ -58,6 +59,8 @@ UM.Dialog
id: nameField id: nameField
width: parent.width width: parent.width
text: base.object text: base.object
placeholderText: base.objectPlaceholder
placeholderTextColor: UM.Theme.getColor("text_field_text_disabled")
maximumLength: 40 maximumLength: 40
selectByMouse: true selectByMouse: true
onTextChanged: base.textChanged(text) onTextChanged: base.textChanged(text)

View file

@ -114,7 +114,8 @@ Item
UM.ToolTip UM.ToolTip
{ {
visible: parent.hovered visible: parent.hovered
targetPoint: Qt.point(parent.x - width, Math.round(parent.y + parent.height / 2)) y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
targetPoint: Qt.point(parent.x, Math.round(parent.y + parent.height / 2))
tooltipText: catalog.i18nc("@info", "Reset to defaults.") tooltipText: catalog.i18nc("@info", "Reset to defaults.")
} }
} }
@ -148,8 +149,9 @@ Item
UM.ToolTip UM.ToolTip
{ {
visible: parent.hovered visible: parent.hovered
targetPoint: Qt.point(parent.x - width, Math.round(parent.y + parent.height / 2)) y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
tooltipText: catalog.i18nc("@info", "Compare and safe.") targetPoint: Qt.point(parent.x, Math.round(parent.y + parent.height / 2))
tooltipText: catalog.i18nc("@info", "Compare and save.")
} }
} }
} }