Browse Source

Render labels using `Text.QtRendering` on OSX

Fonts were looking a bit to thick on when using `Text.NativeRendering`, so using `Text.QtRendering` instead. After this the font weight looks identical to figma (as far as I can see).

In this commit I also changed all `Label`'s to `UM.Label`'s and removed default properties where I could.

CURA-9154
c.lamboo 2 years ago
parent
commit
f0e3c19a34

+ 0 - 1
plugins/3MFReader/WorkspaceDialog.qml

@@ -437,7 +437,6 @@ UM.Dialog
                 {
                     id: warningLabel
                     text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.")
-                    wrapMode: Text.Wrap
                 }
             }
         }

+ 4 - 12
plugins/CuraDrive/src/qml/pages/BackupsPage.qml

@@ -5,7 +5,7 @@ import QtQuick 2.7
 import QtQuick.Controls 2.1
 import QtQuick.Layouts 1.3
 
-import UM 1.3 as UM
+import UM 1.5 as UM
 import Cura 1.1 as Cura
 
 import "../components"
@@ -22,28 +22,23 @@ Item
         width: parent.width
         anchors.fill: parent
 
-        Label
+        UM.Label
         {
             id: backupTitle
             text: catalog.i18nc("@title", "My Backups")
             font: UM.Theme.getFont("large")
-            color: UM.Theme.getColor("text")
             Layout.fillWidth: true
-            renderType: Text.NativeRendering
         }
 
-        Label
+        UM.Label
         {
             text: catalog.i18nc("@empty_state",
                 "You don't have any backups currently. Use the 'Backup Now' button to create one.")
             width: parent.width
-            font: UM.Theme.getFont("default")
-            color: UM.Theme.getColor("text")
             wrapMode: Label.WordWrap
             visible: backupList.model.length == 0
             Layout.fillWidth: true
             Layout.fillHeight: true
-            renderType: Text.NativeRendering
         }
 
         BackupList
@@ -54,16 +49,13 @@ Item
             Layout.fillHeight: true
         }
 
-        Label
+        UM.Label
         {
             text: catalog.i18nc("@backup_limit_info",
                 "During the preview phase, you'll be limited to 5 visible backups. Remove a backup to see older ones.")
             width: parent.width
-            font: UM.Theme.getFont("default")
-            color: UM.Theme.getColor("text")
             wrapMode: Label.WordWrap
             visible: backupList.model.length > 4
-            renderType: Text.NativeRendering
         }
 
         BackupListFooter

+ 3 - 6
plugins/DigitalLibrary/resources/qml/CreateNewProjectPopup.qml

@@ -5,7 +5,7 @@ import QtQuick 2.15
 import QtQuick.Window 2.2
 import QtQuick.Controls 2.3
 
-import UM 1.2 as UM
+import UM 1.5 as UM
 import Cura 1.6 as Cura
 
 import DigitalFactory 1.0 as DF
@@ -64,12 +64,10 @@ Popup
         }
     }
 
-    Label
+    UM.Label
     {
         id: projectNameLabel
         text: "Project Name"
-        font: UM.Theme.getFont("default")
-        color: UM.Theme.getColor("text")
         anchors
         {
             top: createNewLibraryProjectLabel.bottom
@@ -107,13 +105,12 @@ Popup
         }
     }
 
-    Label
+    UM.Label
     {
         id: errorWhileCreatingProjectLabel
         text: manager.projectCreationErrorText
         width: parent.width
         wrapMode: Text.WordWrap
-        font: UM.Theme.getFont("default")
         color: UM.Theme.getColor("error")
         visible: manager.creatingNewProjectStatus == DF.RetrievalStatus.Failed
         anchors

+ 2 - 4
plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml

@@ -83,13 +83,12 @@ Item
             }
         }
 
-        Label
+        UM.Label
         {
             id: emptyProjectLabel
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.verticalCenter: parent.verticalCenter
             text: "Select a project to view its files."
-            font: UM.Theme.getFont("default")
             color: UM.Theme.getColor("setting_category_text")
 
             Connections
@@ -102,14 +101,13 @@ Item
             }
         }
 
-        Label
+        UM.Label
         {
             id: noFilesInProjectLabel
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.verticalCenter: parent.verticalCenter
             visible: (manager.digitalFactoryFileModel.count == 0 && !emptyProjectLabel.visible && !retrievingFilesBusyIndicator.visible)
             text: "No supported files in this project."
-            font: UM.Theme.getFont("default")
             color: UM.Theme.getColor("setting_category_text")
         }
 

+ 4 - 7
plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml

@@ -2,7 +2,7 @@
 import QtQuick 2.10
 import QtQuick.Controls 2.3
 
-import UM 1.2 as UM
+import UM 1.5 as UM
 import Cura 1.6 as Cura
 
 Cura.RoundedRectangle
@@ -58,34 +58,31 @@ Cura.RoundedRectangle
             width: parent.width - x - UM.Theme.getSize("default_margin").width
             anchors.verticalCenter: parent.verticalCenter
 
-            Label
+            UM.Label
             {
                 id: displayNameLabel
                 width: parent.width
                 height: Math.round(parent.height / 3)
                 elide: Text.ElideRight
-                color: UM.Theme.getColor("text")
                 font: UM.Theme.getFont("default_bold")
             }
 
-            Label
+            UM.Label
             {
                 id: usernameLabel
                 width: parent.width
                 height: Math.round(parent.height / 3)
                 elide: Text.ElideRight
                 color: UM.Theme.getColor("small_button_text")
-                font: UM.Theme.getFont("default")
             }
 
-            Label
+            UM.Label
             {
                 id: lastUpdatedLabel
                 width: parent.width
                 height: Math.round(parent.height / 3)
                 elide: Text.ElideRight
                 color: UM.Theme.getColor("small_button_text")
-                font: UM.Theme.getFont("default")
             }
         }
     }

+ 3 - 6
plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml

@@ -44,14 +44,13 @@ Item
         cardMouseAreaEnabled: false
     }
 
-    Label
+    UM.Label
     {
         id: fileNameLabel
         anchors.top: projectSummaryCard.bottom
         anchors.topMargin: UM.Theme.getSize("default_margin").height
         text: "Cura project name"
         font: UM.Theme.getFont("medium")
-        color: UM.Theme.getColor("text")
     }
 
 
@@ -110,13 +109,12 @@ Item
             }
         }
 
-        Label
+        UM.Label
         {
             id: emptyProjectLabel
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.verticalCenter: parent.verticalCenter
             text: "Select a project to view its files."
-            font: UM.Theme.getFont("default")
             color: UM.Theme.getColor("setting_category_text")
 
             Connections
@@ -129,14 +127,13 @@ Item
             }
         }
 
-        Label
+        UM.Label
         {
             id: noFilesInProjectLabel
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.verticalCenter: parent.verticalCenter
             visible: (manager.digitalFactoryFileModel.count == 0 && !emptyProjectLabel.visible && !retrievingFilesBusyIndicator.visible)
             text: "No supported files in this project."
-            font: UM.Theme.getFont("default")
             color: UM.Theme.getColor("setting_category_text")
         }
 

+ 1 - 2
plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml

@@ -104,13 +104,12 @@ Item
                 width: parent.width - 2 * UM.Theme.getSize("thick_margin").width
             }
 
-            Label
+            UM.Label
             {
                 id: noLibraryProjectsLabel
                 anchors.horizontalCenter: parent.horizontalCenter
                 text: searchBar.text === "" ? "It appears that you don't have any projects in the Library yet." : "No projects found that match the search query."
                 font: UM.Theme.getFont("medium")
-                color: UM.Theme.getColor("text")
             }
 
             Cura.TertiaryButton

+ 0 - 2
plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml

@@ -147,8 +147,6 @@ Cura.MachineAction
                             return catalog.i18nc("@label","Firmware update failed due to missing firmware.");
                     }
                 }
-
-                wrapMode: Text.Wrap
             }
 
             UM.ProgressBar

+ 2 - 3
plugins/MachineSettingsAction/MachineSettingsExtruderTab.qml

@@ -4,7 +4,7 @@
 import QtQuick 2.10
 import QtQuick.Controls 2.3
 
-import UM 1.3 as UM
+import UM 1.5 as UM
 import Cura 1.1 as Cura
 
 
@@ -58,11 +58,10 @@ Item
 
             spacing: base.columnSpacing
 
-            Label   // Title Label
+            UM.Label   // Title Label
             {
                 text: catalog.i18nc("@title:label", "Nozzle Settings")
                 font: UM.Theme.getFont("medium_bold")
-                renderType: Text.NativeRendering
             }
 
             Cura.NumericTextFieldWithUnit  // "Nozzle size"

+ 3 - 7
plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml

@@ -5,7 +5,7 @@ import QtQuick 2.10
 import QtQuick.Controls 2.3
 import QtQuick.Layouts 1.3
 
-import UM 1.3 as UM
+import UM 1.5 as UM
 import Cura 1.1 as Cura
 
 
@@ -51,12 +51,10 @@ Item
 
             spacing: base.columnSpacing
 
-            Label   // Title Label
+            UM.Label   // Title Label
             {
                 text: catalog.i18nc("@title:label", "Printer Settings")
                 font: UM.Theme.getFont("medium_bold")
-                color: UM.Theme.getColor("text")
-                renderType: Text.NativeRendering
                 width: parent.width
                 elide: Text.ElideRight
             }
@@ -182,12 +180,10 @@ Item
 
             spacing: base.columnSpacing
 
-            Label   // Title Label
+            UM.Label   // Title Label
             {
                 text: catalog.i18nc("@title:label", "Printhead Settings")
                 font: UM.Theme.getFont("medium_bold")
-                color: UM.Theme.getColor("text")
-                renderType: Text.NativeRendering
                 width: parent.width
                 elide: Text.ElideRight
             }

Some files were not shown because too many files changed in this diff