diff --git a/plugins/SimulationView/SimulationView.qml b/plugins/SimulationView/SimulationView.qml index db92fac798..1f403cecac 100644 --- a/plugins/SimulationView/SimulationView.qml +++ b/plugins/SimulationView/SimulationView.qml @@ -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: width / 2 + radius: Math.floor(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 + UM.Theme.getSize("default_margin").width /2 + anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(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 + UM.Theme.getSize("default_margin").width /2 + anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(UM.Theme.getSize("default_margin").width/2) anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2 } } diff --git a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml index 5a1f8f26a7..aee75d1db5 100644 --- a/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml +++ b/plugins/UltimakerMachineActions/UMOCheckupMachineAction.qml @@ -180,7 +180,7 @@ Cura.MachineAction height: childrenRect.height anchors.top: nozzleTempLabel.top anchors.left: bedTempStatus.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width/2 + anchors.leftMargin: Math.floor(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: UM.Theme.getSize("default_margin").width/2 + anchors.leftMargin: Math.floor(UM.Theme.getSize("default_margin").width/2) visible: checkupMachineAction.usbConnected && manager.hasHeatedBed Button { diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index c130cf041b..d3b17873c3 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -483,7 +483,7 @@ UM.MainWindow anchors { horizontalCenter: parent.horizontalCenter - horizontalCenterOffset: -(UM.Theme.getSize("sidebar").width/ 2) + horizontalCenterOffset: -(Math.floor(UM.Theme.getSize("sidebar").width/ 2)) top: parent.verticalCenter; bottom: parent.bottom; } diff --git a/resources/qml/ExtruderButton.qml b/resources/qml/ExtruderButton.qml index 9212c705f7..e5bc0dd9b5 100644 --- a/resources/qml/ExtruderButton.qml +++ b/resources/qml/ExtruderButton.qml @@ -65,7 +65,7 @@ Button width: UM.Theme.getSize("extruder_button_material").width height: UM.Theme.getSize("extruder_button_material").height - radius: width / 2 + radius: Math.floor(width / 2) border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("extruder_button_material_border") diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index b23ba4c95a..e33470b625 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -179,7 +179,7 @@ Item width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width; height: UM.Theme.getSize("progressbar").height; anchors.top: statusLabel.bottom; - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 4; + anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4); anchors.left: parent.left; anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width; } diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index bf44a29cf5..f21b74be3a 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -76,7 +76,7 @@ Item { width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width height: UM.Theme.getSize("progressbar").height anchors.top: statusLabel.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height/4 + anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height/4) anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width radius: UM.Theme.getSize("progressbar_radius").width @@ -354,7 +354,7 @@ Item { } Behavior on color { ColorAnimation { duration: 50; } } anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("save_button_text_margin").width / 2; + anchors.leftMargin: Math.floor(UM.Theme.getSize("save_button_text_margin").width / 2); width: parent.height height: parent.height diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index cc7ca9354d..ab0d54158d 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -193,7 +193,7 @@ Button anchors { right: inheritButton.visible ? inheritButton.left : parent.right // use 1.9 as the factor because there is a 0.1 difference between the settings and inheritance warning icons - rightMargin: inheritButton.visible ? UM.Theme.getSize("default_margin").width / 2 : category_arrow.width + UM.Theme.getSize("default_margin").width * 1.9 + rightMargin: inheritButton.visible ? Math.floor(UM.Theme.getSize("default_margin").width / 2) : category_arrow.width + Math.floor(UM.Theme.getSize("default_margin").width * 1.9) verticalCenter: parent.verticalCenter } @@ -231,7 +231,7 @@ Button return false } - height: parent.height / 2 + height: Math.floor(parent.height / 2) width: height onClicked: diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 2aad6181d8..423e4ea2e3 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -118,8 +118,8 @@ SettingItem UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: parent.width / 2.5 - height: parent.height / 2.5 + width: Math.floor(parent.width / 2.5) + height: Math.floor(parent.height / 2.5) sourceSize.width: width sourceSize.height: width color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index e6ded2c788..bac44d4831 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -61,7 +61,7 @@ SettingItem { id: downArrow x: control.width - width - control.rightPadding - y: control.topPadding + (control.availableHeight - height) / 2 + y: control.topPadding + Math.floor((control.availableHeight - height) / 2) source: UM.Theme.getIcon("arrow_bottom") width: UM.Theme.getSize("standard_arrow").width diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index b86a69b087..6f1d5e9e48 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -126,16 +126,16 @@ SettingItem background: Rectangle { id: swatch - height: UM.Theme.getSize("setting_control").height / 2 + height: Math.floor(UM.Theme.getSize("setting_control").height / 2) width: height anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - anchors.margins: UM.Theme.getSize("default_margin").width / 4 + anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4) border.width: UM.Theme.getSize("default_lining").width border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border") - radius: width / 2 + radius: Math.floor(width / 2) color: control.color } @@ -180,16 +180,16 @@ SettingItem background: Rectangle { id: swatch - height: UM.Theme.getSize("setting_control").height / 2 + height: Math.floor(UM.Theme.getSize("setting_control").height / 2) width: height anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - anchors.margins: UM.Theme.getSize("default_margin").width / 4 + anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4) border.width: UM.Theme.getSize("default_lining").width border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border") - radius: width / 2 + radius: Math.floor(width / 2) color: control.model.getItem(index).color } diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 1b1f302846..7d789d2573 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -128,12 +128,12 @@ Item { { id: settingControls - height: parent.height / 2 - spacing: UM.Theme.getSize("sidebar_margin").height / 2 + height: Math.floor(parent.height / 2) + spacing: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) anchors { right: controlContainer.left - rightMargin: UM.Theme.getSize("sidebar_margin").width / 2 + rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2) verticalCenter: parent.verticalCenter } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index aaec906b76..651c76cdb0 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -87,7 +87,7 @@ SettingItem { id: downArrow x: control.width - width - control.rightPadding - y: control.topPadding + (control.availableHeight - height) / 2 + y: control.topPadding + Math.floor((control.availableHeight - height) / 2) source: UM.Theme.getIcon("arrow_bottom") width: UM.Theme.getSize("standard_arrow").width @@ -145,16 +145,16 @@ SettingItem background: Rectangle { id: swatch - height: UM.Theme.getSize("setting_control").height / 2 + height: Math.floor(UM.Theme.getSize("setting_control").height / 2) width: height anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - anchors.margins: UM.Theme.getSize("default_margin").width / 4 + anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4) border.width: UM.Theme.getSize("default_lining").width border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border") - radius: width / 2 + radius: Math.floor(width / 2) color: control.color } @@ -199,16 +199,16 @@ SettingItem background: Rectangle { id: swatch - height: UM.Theme.getSize("setting_control").height / 2 + height: Math.floor(UM.Theme.getSize("setting_control").height / 2) width: height anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - anchors.margins: UM.Theme.getSize("default_margin").width / 4 + anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4) border.width: UM.Theme.getSize("default_lining").width border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border") - radius: width / 2 + radius: Math.floor(width / 2) color: control.model.getItem(index).color } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index ebfb0f6aff..a64499fdba 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -84,7 +84,7 @@ Column delegate: Button { height: ListView.view.height - width: ListView.view.width / extrudersModel.rowCount() + width: Math.floor(ListView.view.width / extrudersModel.rowCount()) text: model.name tooltip: model.name @@ -192,15 +192,15 @@ Column { right: parent.right top: parent.top - rightMargin: parent.sizeToUse * 0.01 - topMargin: parent.sizeToUse * 0.05 + rightMargin: Math.floor(parent.sizeToUse * 0.01) + topMargin: Math.floor(parent.sizeToUse * 0.05) } color: model.color - width: parent.width * 0.35 - height: parent.height * 0.35 - radius: width / 2 + width: Math.floor(parent.width * 0.35) + height: Math.floor(parent.height * 0.35) + radius: Math.floor(width / 2) border.width: 1 border.color: UM.Theme.getColor("extruder_button_material_border") @@ -219,7 +219,7 @@ Column Item { id: variantRowSpacer - height: UM.Theme.getSize("sidebar_margin").height / 4 + height: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4) width: height visible: !extruderSelectionRow.visible } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 1744647182..98d049b2d1 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -190,7 +190,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.top: parent.top - anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) + anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") text: { @@ -219,13 +219,13 @@ Item // Make sure the text aligns correctly with each tick if (qualityModel.totalTicks == 0) { // If there is only one tick, align it centrally - return parseInt(((base.width * 0.55) - width) / 2) + return Math.floor(((base.width * 0.55) - width) / 2) } else if (index == 0) { - return (base.width * 0.55 / qualityModel.totalTicks) * index + return Math.floor(base.width * 0.55 / qualityModel.totalTicks) * index } else if (index == qualityModel.totalTicks) { - return (base.width * 0.55 / qualityModel.totalTicks) * index - width + return Math.floor(base.width * 0.55 / qualityModel.totalTicks) * index - width } else { - return parseInt((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2)) + return Math.floor((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2)) } } } @@ -277,7 +277,7 @@ Item color: UM.Theme.getColor("quality_slider_unavailable") implicitWidth: 10 * screenScaleFactor implicitHeight: implicitWidth - radius: width / 2 + radius: Math.floor(width / 2) } Slider @@ -306,7 +306,7 @@ Item groove: Rectangle { implicitHeight: 2 * screenScaleFactor color: UM.Theme.getColor("quality_slider_available") - radius: height / 2 + radius: Math.floor(height / 2) } handle: Item { Rectangle { @@ -315,7 +315,7 @@ Item color: UM.Theme.getColor("quality_slider_available") implicitWidth: 10 * screenScaleFactor implicitHeight: implicitWidth - radius: implicitWidth / 2 + radius: Math.floor(implicitWidth / 2) visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile } } @@ -393,12 +393,12 @@ Item id: customisedSettings visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated - height: speedSlider.height * 0.8 - width: speedSlider.height * 0.8 + height: Math.floor(speedSlider.height * 0.8) + width: Math.floor(speedSlider.height * 0.8) anchors.verticalCenter: speedSlider.verticalCenter anchors.right: speedSlider.left - anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width / 2 + anchors.rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2) color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button"); iconSource: UM.Theme.getIcon("reset"); @@ -470,7 +470,7 @@ Item //anchors.top: parent.top anchors.left: infillSlider.left - anchors.leftMargin: parseInt((infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor) + anchors.leftMargin: Math.floor((infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor) anchors.right: parent.right text: parseInt(infillDensity.properties.value) + "%" @@ -565,7 +565,7 @@ Item width: 1 * screenScaleFactor height: 6 * screenScaleFactor y: 0 - x: styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count-1)) + x: Math.round(styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count-1))) visible: shouldShowTick(index) } } @@ -576,12 +576,12 @@ Item { id: infillIcon - width: (parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width) + width: Math.floor((parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width)) height: width anchors.right: parent.right anchors.top: parent.top - anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) + anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) // we loop over all density icons and only show the one that has the current density and steps Repeater @@ -592,8 +592,8 @@ Item function activeIndex () { for (var i = 0; i < infillModel.count; i++) { - var density = parseInt(infillDensity.properties.value) - var steps = parseInt(infillSteps.properties.value) + var density = Math.floor(infillDensity.properties.value) + var steps = Math.floor(infillSteps.properties.value) var infillModelItem = infillModel.get(i) if (infillModelItem != "undefined" @@ -634,7 +634,7 @@ Item property alias _hovered: enableGradualInfillMouseArea.containsMouse anchors.top: infillSlider.bottom - anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category + anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category anchors.left: infillCellRight.left style: UM.Theme.styles.checkbox @@ -676,7 +676,7 @@ Item Label { id: gradualInfillLabel anchors.left: enableGradualInfillCheckBox.right - anchors.leftMargin: parseInt(UM.Theme.getSize("sidebar_margin").width / 2) + anchors.leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2) text: catalog.i18nc("@label", "Enable gradual") font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index 07b95777b5..5929ee42cf 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -36,7 +36,7 @@ UM.PointingRectangle { } } base.opacity = 1; - target = Qt.point(40 , position.y + UM.Theme.getSize("tooltip_arrow_margins").height / 2) + target = Qt.point(40 , position.y + Math.floor(UM.Theme.getSize("tooltip_arrow_margins").height / 2)) } function hide() { diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 77ffc7f2a9..55b56ea2d8 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -91,7 +91,7 @@ Item anchors.topMargin: base.activeY z: buttons.z -1 - target: Qt.point(parent.right, base.activeY + UM.Theme.getSize("button").height/2) + target: Qt.point(parent.right, base.activeY + Math.floor(UM.Theme.getSize("button").height/2)) arrowSize: UM.Theme.getSize("default_arrow").width width: diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 20f858c238..e454196409 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -268,7 +268,7 @@ QtObject { anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2 anchors.verticalCenter: parent.verticalCenter - target: Qt.point(parent.x, y + height/2) + target: Qt.point(parent.x, y + Math.floor(height/2)) arrowSize: Theme.getSize("button_tooltip_arrow").width color: Theme.getColor("button_tooltip") opacity: control.hovered ? 1.0 : 0.0; @@ -712,14 +712,14 @@ QtObject { scrollBarBackground: Rectangle { implicitWidth: Theme.getSize("scrollbar").width - radius: implicitWidth / 2 + radius: Math.floor(implicitWidth / 2) color: Theme.getColor("scrollbar_background"); } handle: Rectangle { id: scrollViewHandle implicitWidth: Theme.getSize("scrollbar").width; - radius: implicitWidth / 2 + radius: Math.floor(implicitWidth / 2) color: styleData.pressed ? Theme.getColor("scrollbar_handle_down") : styleData.hovered ? Theme.getColor("scrollbar_handle_hover") : Theme.getColor("scrollbar_handle"); Behavior on color { ColorAnimation { duration: 50; } } @@ -806,12 +806,12 @@ QtObject { Rectangle { id: swatch - height: UM.Theme.getSize("setting_control").height / 2 + height: Math.floor(UM.Theme.getSize("setting_control").height / 2) width: height anchors.right: downArrow.left anchors.verticalCenter: parent.verticalCenter - anchors.margins: UM.Theme.getSize("default_margin").width / 4 - radius: width / 2 + anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4) + radius: Math.floor(width / 2) border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") color: (control.color_override !== "") ? control.color_override : control.color @@ -845,7 +845,7 @@ QtObject { color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox"); Behavior on color { ColorAnimation { duration: 50; } } - radius: control.exclusiveGroup ? Theme.getSize("checkbox").width / 2 : 0 + radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0 border.width: Theme.getSize("default_lining").width; border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border"); @@ -853,8 +853,8 @@ QtObject { UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: parent.width / 2.5 - height: parent.height / 2.5 + width: Math.floor(parent.width / 2.5) + height: Math.floor(parent.height / 2.5) sourceSize.width: width sourceSize.height: width color: Theme.getColor("checkbox_mark") @@ -882,7 +882,7 @@ QtObject { color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox"); Behavior on color { ColorAnimation { duration: 50; } } - radius: control.exclusiveGroup ? Theme.getSize("checkbox").width / 2 : 0 + radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0 border.width: Theme.getSize("default_lining").width; border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border"); @@ -890,8 +890,8 @@ QtObject { UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: parent.width / 2.5 - height: parent.height / 2.5 + width: Math.floor(parent.width / 2.5) + height: Math.floor(parent.height / 2.5) sourceSize.width: width sourceSize.height: width color: Theme.getColor("checkbox_mark") @@ -925,7 +925,7 @@ QtObject { border.width: Theme.getSize("default_lining").width; border.color: Theme.getColor("slider_groove_border"); - radius: width / 2; + radius: Math.floor(width / 2); Rectangle { anchors { @@ -934,8 +934,8 @@ QtObject { bottom: parent.bottom; } color: Theme.getColor("slider_groove_fill"); - width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width; - radius: width / 2; + width: Math.floor((control.value / (control.maximumValue - control.minimumValue)) * parent.width); + radius: Math.floor(width / 2); } } handle: Rectangle { @@ -944,7 +944,7 @@ QtObject { color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle"); border.width: Theme.getSize("default_lining").width border.color: control.hovered ? Theme.getColor("slider_handle_hover_border") : Theme.getColor("slider_handle_border") - radius: Theme.getSize("slider_handle").width / 2; //Round. + radius: Math.floor(Theme.getSize("slider_handle").width / 2); //Round. Behavior on color { ColorAnimation { duration: 50; } } } }