Browse Source

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
Remco Burema 2 years ago
parent
commit
3bc955fe8f

+ 22 - 11
resources/qml/Cura.qml

@@ -876,7 +876,7 @@ UM.MainWindow
     {
         id: createNewQualityDialog
         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:")
         extraInfo:
         [
@@ -887,17 +887,28 @@ UM.MainWindow
                 source: UM.Theme.getIcon("Information")
                 color: UM.Theme.getColor("text")
             },
-            UM.Label
+            Column
             {
-                text: catalog.i18nc
-                (
-                    "@label %i will be replaced with a profile name",
-                    "<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/>" +
-                    "for materials that support it.<br/>" +
-                    "<a href=\"%2\">Learn more about Cura print profiles</a>"
-                ).arg(Cura.MachineManager.activeQualityOrQualityChangesName).arg("https://support.ultimaker.com/s/article/1667337576882")
-                wrapMode: Text.WordWrap
+                UM.Label
+                {
+                    text: catalog.i18nc
+                    (
+                        "@label %i will be replaced with a profile name",
+                        "<b>Only user changed settings will be saved in the custom profile.</b><br/>" +
+                        "For materials that support it, the new custom profile will inherit properties from <b>%1</b>."
+                    ).arg(Cura.MachineManager.activeQualityOrQualityChangesName)
+                    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")

+ 0 - 8
resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml

@@ -155,14 +155,6 @@ UM.Dialog
                     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
         }
     ]
 

+ 3 - 0
resources/qml/Dialogs/RenameDialog.qml

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

+ 5 - 3
resources/qml/PrintSetupSelector/ProfileWarningReset.qml

@@ -114,7 +114,8 @@ Item
         UM.ToolTip
         {
             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.")
         }
     }
@@ -148,8 +149,9 @@ Item
         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.")
+            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", "Compare and save.")
         }
     }
 }