Browse Source

Merge branch '3.2'

Lots of conflicts due to rounding vs. flooring of text element positions for weirdness with the font aliasing.
Ghostkeeper 7 years ago
parent
commit
ee9de1f11b

+ 2 - 2
plugins/MachineSettingsAction/MachineSettingsAction.qml

@@ -70,8 +70,8 @@ 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 labelColumnWidth: Math.floor(columnWidth / 2)
+            property real columnWidth: Math.round((width - 3 * UM.Theme.getSize("default_margin").width) / 2)
+            property real labelColumnWidth: Math.round(columnWidth / 2)
 
             Tab
             {

+ 1 - 1
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml

@@ -237,7 +237,7 @@ Item {
 
                         Button
                         {
-                            width: Math.floor(UM.Theme.getSize("setting").height / 2)
+                            width: Math.round(UM.Theme.getSize("setting").height / 2)
                             height: UM.Theme.getSize("setting").height
 
                             onClicked: addedSettingsModel.setVisible(model.key, false)

+ 11 - 11
plugins/PostProcessingPlugin/PostProcessingPlugin.qml

@@ -25,8 +25,8 @@ UM.Dialog
     {
         UM.I18nCatalog{id: catalog; name:"cura"}
         id: base
-        property int columnWidth: Math.floor((base.width / 2) - UM.Theme.getSize("default_margin").width)
-        property int textMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+        property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width)
+        property int textMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
         property string activeScriptName
         SystemPalette{ id: palette }
         SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled }
@@ -129,8 +129,8 @@ UM.Dialog
                                 {
                                     anchors.verticalCenter: parent.verticalCenter
                                     anchors.horizontalCenter: parent.horizontalCenter
-                                    width: Math.floor(control.width / 2.7)
-                                    height: Math.floor(control.height / 2.7)
+                                    width: Math.round(control.width / 2.7)
+                                    height: Math.round(control.height / 2.7)
                                     sourceSize.width: width
                                     sourceSize.height: width
                                     color: palette.text
@@ -164,8 +164,8 @@ UM.Dialog
                                 {
                                     anchors.verticalCenter: parent.verticalCenter
                                     anchors.horizontalCenter: parent.horizontalCenter
-                                    width: Math.floor(control.width / 2.5)
-                                    height: Math.floor(control.height / 2.5)
+                                    width: Math.round(control.width / 2.5)
+                                    height: Math.round(control.height / 2.5)
                                     sourceSize.width: width
                                     sourceSize.height: width
                                     color: control.enabled ? palette.text : disabledPalette.text
@@ -199,8 +199,8 @@ UM.Dialog
                                 {
                                     anchors.verticalCenter: parent.verticalCenter
                                     anchors.horizontalCenter: parent.horizontalCenter
-                                    width: Math.floor(control.width / 2.5)
-                                    height: Math.floor(control.height / 2.5)
+                                    width: Math.round(control.width / 2.5)
+                                    height: Math.round(control.height / 2.5)
                                     sourceSize.width: width
                                     sourceSize.height: width
                                     color: control.enabled ? palette.text : disabledPalette.text
@@ -478,15 +478,15 @@ UM.Dialog
                            control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
                 Behavior on color { ColorAnimation { duration: 50; } }
                 anchors.left: parent.left
-                anchors.leftMargin: Math.floor(UM.Theme.getSize("save_button_text_margin").width / 2);
+                anchors.leftMargin: Math.round(UM.Theme.getSize("save_button_text_margin").width / 2);
                 width: parent.height
                 height: parent.height
 
                 UM.RecolorImage {
                     anchors.verticalCenter: parent.verticalCenter
                     anchors.horizontalCenter: parent.horizontalCenter
-                    width: Math.floor(parent.width / 2)
-                    height: Math.floor(parent.height / 2)
+                    width: Math.round(parent.width / 2)
+                    height: Math.round(parent.height / 2)
                     sourceSize.width: width
                     sourceSize.height: height
                     color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :

+ 2 - 2
plugins/SimulationView/SimulationSliderLabel.qml

@@ -49,7 +49,7 @@ UM.PointingRectangle {
 
         anchors {
             left: parent.left
-            leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+            leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
             verticalCenter: parent.verticalCenter
         }
 
@@ -91,7 +91,7 @@ UM.PointingRectangle {
 
         anchors {
             left: parent.right
-            leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+            leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
             verticalCenter: parent.verticalCenter
         }
 

+ 7 - 7
plugins/SimulationView/SimulationView.qml

@@ -61,7 +61,7 @@ Item
         Button {
             id: collapseButton
             anchors.top: parent.top
-            anchors.topMargin: Math.floor(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
+            anchors.topMargin: Math.round(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
             anchors.right: parent.right
             anchors.rightMargin: UM.Theme.getSize("default_margin").width
 
@@ -193,7 +193,7 @@ Item
 
             Item
             {
-                height: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+                height: Math.round(UM.Theme.getSize("default_margin").width / 2)
                 width: width
             }
 
@@ -231,7 +231,7 @@ Item
                         width: UM.Theme.getSize("layerview_legend_size").width
                         height: UM.Theme.getSize("layerview_legend_size").height
                         color: model.color
-                        radius: Math.floor(width / 2)
+                        radius: Math.round(width / 2)
                         border.width: UM.Theme.getSize("default_lining").width
                         border.color: UM.Theme.getColor("lining")
                         visible: !viewSettings.show_legend & !viewSettings.show_gradient
@@ -249,7 +249,7 @@ Item
                         anchors.verticalCenter: parent.verticalCenter
                         anchors.left: extrudersModelCheckBox.left;
                         anchors.right: extrudersModelCheckBox.right;
-                        anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(UM.Theme.getSize("default_margin").width/2)
+                        anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width/2)
                         anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
                     }
                 }
@@ -316,7 +316,7 @@ Item
                         anchors.verticalCenter: parent.verticalCenter
                         anchors.left: legendModelCheckBox.left;
                         anchors.right: legendModelCheckBox.right;
-                        anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(UM.Theme.getSize("default_margin").width/2)
+                        anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width/2)
                         anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
                     }
                 }
@@ -461,7 +461,7 @@ Item
                 visible: viewSettings.show_feedrate_gradient
                 anchors.left: parent.right
                 height: parent.width
-                width: Math.floor(UM.Theme.getSize("layerview_row").height * 1.5)
+                width: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
                 border.width: UM.Theme.getSize("default_lining").width
                 border.color: UM.Theme.getColor("lining")
                 transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}
@@ -492,7 +492,7 @@ Item
                 visible: viewSettings.show_thickness_gradient
                 anchors.left: parent.right
                 height: parent.width
-                width: Math.floor(UM.Theme.getSize("layerview_row").height * 1.5)
+                width: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
                 border.width: UM.Theme.getSize("default_lining").width
                 border.color: UM.Theme.getColor("lining")
                 transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}

+ 8 - 8
plugins/UM3NetworkPrinting/DiscoverUM3Action.qml

@@ -114,7 +114,7 @@ Cura.MachineAction
 
             Column
             {
-                width: Math.floor(parent.width * 0.5)
+                width: Math.round(parent.width * 0.5)
                 spacing: UM.Theme.getSize("default_margin").height
 
                 ScrollView
@@ -198,7 +198,7 @@ Cura.MachineAction
             }
             Column
             {
-                width: Math.floor(parent.width * 0.5)
+                width: Math.round(parent.width * 0.5)
                 visible: base.selectedDevice ? true : false
                 spacing: UM.Theme.getSize("default_margin").height
                 Label
@@ -216,13 +216,13 @@ Cura.MachineAction
                     columns: 2
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Type")
                     }
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text:
                         {
@@ -247,25 +247,25 @@ Cura.MachineAction
                     }
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Firmware version")
                     }
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text: base.selectedDevice ? base.selectedDevice.firmwareVersion : ""
                     }
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text: catalog.i18nc("@label", "Address")
                     }
                     Label
                     {
-                        width: Math.floor(parent.width * 0.5)
+                        width: Math.round(parent.width * 0.5)
                         wrapMode: Text.WordWrap
                         text: base.selectedDevice ? base.selectedDevice.ipAddress : ""
                     }

+ 1 - 1
plugins/UM3NetworkPrinting/PrintCoreConfiguration.qml

@@ -10,7 +10,7 @@ Item
     id: extruderInfo
     property var printCoreConfiguration
 
-    width: Math.floor(parent.width / 2)
+    width: Math.round(parent.width / 2)
     height: childrenRect.height
     Label
     {

+ 8 - 8
plugins/UM3NetworkPrinting/PrinterInfoBlock.qml

@@ -78,7 +78,7 @@ Rectangle
 
         Rectangle
         {
-            width: Math.floor(parent.width / 3)
+            width: Math.round(parent.width / 3)
             height: parent.height
 
             Label   // Print job name
@@ -123,7 +123,7 @@ Rectangle
 
         Rectangle
         {
-            width: Math.floor(parent.width / 3 * 2)
+            width: Math.round(parent.width / 3 * 2)
             height: parent.height
 
             Label   // Friendly machine name
@@ -131,7 +131,7 @@ Rectangle
                 id: printerNameLabel
                 anchors.top: parent.top
                 anchors.left: parent.left
-                width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width - showCameraIcon.width)
+                width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width - showCameraIcon.width)
                 text: printer.name
                 font: UM.Theme.getFont("default_bold")
                 elide: Text.ElideRight
@@ -141,7 +141,7 @@ Rectangle
             {
                 id: printerTypeLabel
                 anchors.top: printerNameLabel.bottom
-                width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
+                width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
                 text: printer.type
                 anchors.left: parent.left
                 elide: Text.ElideRight
@@ -175,7 +175,7 @@ Rectangle
                 id: extruderInfo
                 anchors.bottom: parent.bottom
 
-                width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
+                width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
                 height: childrenRect.height
 
                 spacing: UM.Theme.getSize("default_margin").width
@@ -183,7 +183,7 @@ Rectangle
                 PrintCoreConfiguration
                 {
                     id: leftExtruderInfo
-                    width: Math.floor((parent.width - extruderSeperator.width) / 2)
+                    width: Math.round((parent.width - extruderSeperator.width) / 2)
                     printCoreConfiguration: printer.extruders[0]
                 }
 
@@ -198,7 +198,7 @@ Rectangle
                 PrintCoreConfiguration
                 {
                     id: rightExtruderInfo
-                    width: Math.floor((parent.width - extruderSeperator.width) / 2)
+                    width: Math.round((parent.width - extruderSeperator.width) / 2)
                     printCoreConfiguration: printer.extruders[1]
                 }
             }
@@ -209,7 +209,7 @@ Rectangle
                 anchors.right: parent.right
                 anchors.top: parent.top
                 height: showExtended ? parent.height: printProgressTitleBar.height
-                width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
+                width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
                 border.width: UM.Theme.getSize("default_lining").width
                 border.color: lineColor
                 radius: cornerRadius

+ 1 - 1
plugins/UM3NetworkPrinting/PrinterVideoStream.qml

@@ -57,7 +57,7 @@ Item
     {
         id: cameraImage
         width: Math.min(sourceSize.width === 0 ? 800 * screenScaleFactor : sourceSize.width, maximumWidth)
-        height: Math.floor((sourceSize.height === 0 ? 600 * screenScaleFactor : sourceSize.height) * width / sourceSize.width)
+        height: Math.round((sourceSize.height === 0 ? 600 * screenScaleFactor : sourceSize.height) * width / sourceSize.width)
         anchors.horizontalCenter: parent.horizontalCenter
         anchors.verticalCenter: parent.verticalCenter
         z: 1

+ 2 - 2
plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml

@@ -180,7 +180,7 @@ Cura.MachineAction
                 height: childrenRect.height
                 anchors.top: nozzleTempLabel.top
                 anchors.left: bedTempStatus.right
-                anchors.leftMargin: Math.floor(UM.Theme.getSize("default_margin").width/2)
+                anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width/2)
                 visible: checkupMachineAction.usbConnected
                 Button
                 {
@@ -241,7 +241,7 @@ Cura.MachineAction
                 height: childrenRect.height
                 anchors.top: bedTempLabel.top
                 anchors.left: bedTempStatus.right
-                anchors.leftMargin: Math.floor(UM.Theme.getSize("default_margin").width/2)
+                anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width/2)
                 visible: checkupMachineAction.usbConnected && manager.hasHeatedBed
                 Button
                 {

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