Browse Source

Merge branch 'fix_system_text_rendering' of https://github.com/fieldOfView/Cura

Jaime van Kessel 7 years ago
parent
commit
021425ee06

+ 25 - 25
plugins/3MFReader/WorkspaceDialog.qml

@@ -87,18 +87,18 @@ UM.Dialog
                 {
                     text: catalog.i18nc("@action:label", "Printer settings")
                     font.bold: true
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Item
                 {
                     // spacer
                     height: spacerHeight
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 UM.TooltipArea
                 {
                     id: machineResolveTooltip
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                     height: visible ? comboboxHeight : 0
                     visible: manager.machineConflict
                     text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?")
@@ -122,12 +122,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Type")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: manager.machineType
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
             }
 
@@ -138,12 +138,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Name")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: manager.machineName
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
             }
 
@@ -160,18 +160,18 @@ UM.Dialog
                 {
                     text: catalog.i18nc("@action:label", "Profile settings")
                     font.bold: true
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Item
                 {
                     // spacer
                     height: spacerHeight
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 UM.TooltipArea
                 {
                     id: qualityChangesResolveTooltip
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                     height: visible ? comboboxHeight : 0
                     visible: manager.qualityChangesConflict
                     text: catalog.i18nc("@info:tooltip", "How should the conflict in the profile be resolved?")
@@ -195,12 +195,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Name")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: manager.qualityName
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
             }
             Row
@@ -210,12 +210,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Not in profile")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 visible: manager.numUserSettings != 0
             }
@@ -226,12 +226,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Derivative from")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges)
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 visible: manager.numSettingsOverridenByQualityChanges != 0
             }
@@ -248,18 +248,18 @@ UM.Dialog
                 {
                     text: catalog.i18nc("@action:label", "Material settings")
                     font.bold: true
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Item
                 {
                     // spacer
                     height: spacerHeight
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 UM.TooltipArea
                 {
                     id: materialResolveTooltip
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                     height: visible ? comboboxHeight : 0
                     visible: manager.materialConflict
                     text: catalog.i18nc("@info:tooltip", "How should the conflict in the material be resolved?")
@@ -287,12 +287,12 @@ UM.Dialog
                     Label
                     {
                         text: catalog.i18nc("@action:label", "Name")
-                        width: parent.width / 3
+                        width: (parent.width / 3) | 0
                     }
                     Label
                     {
                         text: modelData
-                        width: parent.width / 3
+                        width: (parent.width / 3) | 0
                     }
                 }
             }
@@ -315,12 +315,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Mode")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: manager.activeMode
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
             }
             Row
@@ -330,12 +330,12 @@ UM.Dialog
                 Label
                 {
                     text: catalog.i18nc("@action:label", "Visible settings:")
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
                 Label
                 {
                     text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
-                    width: parent.width / 3
+                    width: (parent.width / 3) | 0
                 }
             }
             Item // Spacer

+ 2 - 2
plugins/ChangeLogPlugin/ChangeLog.qml

@@ -11,8 +11,8 @@ import UM 1.1 as UM
 UM.Dialog
 {
     id: base
-    minimumWidth: UM.Theme.getSize("modal_window_minimum").width * 0.75
-    minimumHeight: UM.Theme.getSize("modal_window_minimum").height * 0.75
+    minimumWidth: (UM.Theme.getSize("modal_window_minimum").width * 0.75) | 0
+    minimumHeight: (UM.Theme.getSize("modal_window_minimum").height * 0.75) | 0
     width: minimumWidth
     height: minimumHeight
     title: catalog.i18nc("@label", "Changelog")

+ 1 - 1
plugins/MachineSettingsAction/MachineSettingsAction.qml

@@ -70,7 +70,7 @@ Cura.MachineAction
             anchors.top: pageTitle.bottom
             anchors.topMargin: UM.Theme.getSize("default_margin").height
 
-            property real columnWidth: Math.floor((width - 3 * UM.Theme.getSize("default_margin").width) / 2)
+            property real columnWidth: ((width - 3 * UM.Theme.getSize("default_margin").width) / 2) | 0
 
             Tab
             {

+ 1 - 1
plugins/PerObjectSettingsTool/PerObjectCategory.qml

@@ -22,7 +22,7 @@ Button {
             UM.RecolorImage
             {
                 anchors.verticalCenter: parent.verticalCenter
-                height: label.height / 2
+                height: (label.height / 2) | 0
                 width: height
                 source: control.checked ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right");
                 color: control.hovered ? palette.highlight : palette.buttonText

+ 3 - 3
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml

@@ -110,10 +110,10 @@ Item {
 
                         Button
                         {
-                            width: UM.Theme.getSize("setting").height / 2;
-                            height: UM.Theme.getSize("setting").height;
+                            width: (UM.Theme.getSize("setting").height / 2) | 0
+                            height: UM.Theme.getSize("setting").height
 
-                            onClicked: addedSettingsModel.setVisible(model.key, false);
+                            onClicked: addedSettingsModel.setVisible(model.key, false)
 
                             style: ButtonStyle
                             {

+ 8 - 8
plugins/UM3NetworkPrinting/DiscoverUM3Action.qml

@@ -114,7 +114,7 @@ Cura.MachineAction
 
             Column
             {
-                width: parent.width * 0.5
+                width: (parent.width * 0.5) | 0
                 spacing: UM.Theme.getSize("default_margin").height
 
                 ScrollView
@@ -200,7 +200,7 @@ Cura.MachineAction
             }
             Column
             {
-                width: parent.width * 0.5
+                width: (parent.width * 0.5) | 0
                 visible: base.selectedPrinter ? true : false
                 spacing: UM.Theme.getSize("default_margin").height
                 Label
@@ -218,13 +218,13 @@ Cura.MachineAction
                     columns: 2
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Type")
                     }
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text:
                         {
@@ -249,25 +249,25 @@ Cura.MachineAction
                     }
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Firmware version")
                     }
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text: base.selectedPrinter ? base.selectedPrinter.firmwareVersion : ""
                     }
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Address")
                     }
                     Label
                     {
-                        width: parent.width * 0.5
+                        width: (parent.width * 0.5) | 0
                         wrapMode: Text.WordWrap
                         text: base.selectedPrinter ? base.selectedPrinter.ipAddress : ""
                     }

+ 8 - 8
plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml

@@ -13,8 +13,8 @@ Cura.MachineAction
     {
         id: checkupMachineAction
         anchors.fill: parent;
-        property int leftRow: checkupMachineAction.width * 0.40
-        property int rightRow: checkupMachineAction.width * 0.60
+        property int leftRow: (checkupMachineAction.width * 0.40) | 0
+        property int rightRow: (checkupMachineAction.width * 0.60) | 0
         property bool heatupHotendStarted: false
         property bool heatupBedStarted: false
         property bool usbConnected: Cura.USBPrinterManager.connectedPrinterList.rowCount() > 0
@@ -166,7 +166,7 @@ Cura.MachineAction
             Label
             {
                 id: nozzleTempStatus
-                width: checkupMachineAction.rightRow * 0.4
+                width: (checkupMachineAction.rightRow * 0.4) | 0
                 anchors.top: nozzleTempLabel.top
                 anchors.left: nozzleTempLabel.right
                 wrapMode: Text.WordWrap
@@ -176,7 +176,7 @@ Cura.MachineAction
             Item
             {
                 id: nozzleTempButton
-                width: checkupMachineAction.rightRow * 0.3
+                width: (checkupMachineAction.rightRow * 0.3) | 0
                 height: childrenRect.height
                 anchors.top: nozzleTempLabel.top
                 anchors.left: bedTempStatus.right
@@ -205,7 +205,7 @@ Cura.MachineAction
                 anchors.top: nozzleTempLabel.top
                 anchors.left: nozzleTempButton.right
                 anchors.leftMargin: UM.Theme.getSize("default_margin").width
-                width: checkupMachineAction.rightRow * 0.2
+                width: (checkupMachineAction.rightRow * 0.2) | 0
                 wrapMode: Text.WordWrap
                 text: manager.hotendTemperature + "°C"
                 font.bold: true
@@ -227,7 +227,7 @@ Cura.MachineAction
             Label
             {
                 id: bedTempStatus
-                width: checkupMachineAction.rightRow * 0.4
+                width: (checkupMachineAction.rightRow * 0.4) | 0
                 anchors.top: bedTempLabel.top
                 anchors.left: bedTempLabel.right
                 wrapMode: Text.WordWrap
@@ -237,7 +237,7 @@ Cura.MachineAction
             Item
             {
                 id: bedTempButton
-                width: checkupMachineAction.rightRow * 0.3
+                width: (checkupMachineAction.rightRow * 0.3) | 0
                 height: childrenRect.height
                 anchors.top: bedTempLabel.top
                 anchors.left: bedTempStatus.right
@@ -263,7 +263,7 @@ Cura.MachineAction
             Label
             {
                 id: bedTemp
-                width: checkupMachineAction.rightRow * 0.2
+                width: (checkupMachineAction.rightRow * 0.2) | 0
                 anchors.top: bedTempLabel.top
                 anchors.left: bedTempButton.right
                 anchors.leftMargin: UM.Theme.getSize("default_margin").width

+ 4 - 4
resources/qml/AboutDialog.qml

@@ -22,15 +22,15 @@ UM.Dialog
     Image
     {
         id: logo
-        width: base.minimumWidth * 0.85
-        height: width * (1/4.25)
+        width: (base.minimumWidth * 0.85) | 0
+        height: (width * (1/4.25)) | 0
 
         source: UM.Theme.getImage("logo")
 
         sourceSize.width: width
         sourceSize.height: height
         anchors.top: parent.top
-        anchors.topMargin: (base.minimumWidth - width) / 2
+        anchors.topMargin: ((base.minimumWidth - width) / 2) | 0
         anchors.horizontalCenter: parent.horizontalCenter
 
         UM.I18nCatalog{id: catalog; name:"cura"}
@@ -44,7 +44,7 @@ UM.Dialog
         font: UM.Theme.getFont("large")
         anchors.right : logo.right
         anchors.top: logo.bottom
-        anchors.topMargin: UM.Theme.getSize("default_margin").height / 2
+        anchors.topMargin: (UM.Theme.getSize("default_margin").height / 2) | 0
     }
 
     Label

+ 3 - 3
resources/qml/DiscardOrKeepProfileChangesDialog.qml

@@ -109,20 +109,20 @@ UM.Dialog
                 role: "label"
                 title: catalog.i18nc("@title:column", "Profile settings")
                 delegate: labelDelegate
-                width: tableView.width * 0.4
+                width: (tableView.width * 0.4) | 0
             }
             TableViewColumn
             {
                 role: "original_value"
                 title: catalog.i18nc("@title:column", "Default")
-                width: tableView.width * 0.3
+                width: (tableView.width * 0.3) | 0
                 delegate: defaultDelegate
             }
             TableViewColumn
             {
                 role: "user_value"
                 title: catalog.i18nc("@title:column", "Customized")
-                width: tableView.width * 0.3 - 1
+                width: (tableView.width * 0.3) | 0
             }
             section.property: "category"
             section.delegate: Label

+ 1 - 1
resources/qml/OpenFilesIncludingProjectsDialog.qml

@@ -59,7 +59,7 @@ UM.Dialog
         anchors.right: parent.right
         spacing: 10
 
-        Text
+        Label
         {
             text: catalog.i18nc("@text:window", "We have found one or more project file(s) within the files you have selected. You can open only one project file at a time. We suggest to only import models from those files. Would you like to proceed?")
             anchors.left: parent.left

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