diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 9056bbe45a..a291c97733 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -26,7 +26,7 @@ SettingItem anchors.fill: parent - border.width: UM.Theme.getSize("default_lining").width + border.width: Math.floor(UM.Theme.getSize("default_lining").width) border.color: { if(!enabled) @@ -76,7 +76,7 @@ SettingItem Rectangle { anchors.fill: parent; - anchors.margins: UM.Theme.getSize("default_lining").width; + anchors.margins: Math.floor(UM.Theme.getSize("default_lining").width); color: UM.Theme.getColor("setting_control_highlight") opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35; } @@ -84,7 +84,7 @@ SettingItem Label { anchors.right: parent.right; - anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width) anchors.verticalCenter: parent.verticalCenter; text: definition.unit; @@ -107,9 +107,9 @@ SettingItem anchors { left: parent.left - leftMargin: UM.Theme.getSize("setting_unit_margin").width + leftMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width) right: parent.right - rightMargin: UM.Theme.getSize("setting_unit_margin").width + rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width) verticalCenter: parent.verticalCenter } renderType: Text.NativeRendering diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 648c2db3b9..a28c1725b3 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -30,9 +30,9 @@ Item { top: parent.top left: parent.left - leftMargin: UM.Theme.getSize("sidebar_margin").width + leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) right: parent.right - rightMargin: UM.Theme.getSize("sidebar_margin").width + rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) } Label @@ -87,7 +87,7 @@ Item anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width + anchors.rightMargin: Math.floor(UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width) color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button"); iconSource: UM.Theme.getIcon("star"); @@ -112,7 +112,7 @@ Item id: filterContainer visible: true - border.width: UM.Theme.getSize("default_lining").width + border.width: Math.floor(UM.Theme.getSize("default_lining").width) border.color: { if(hoverMouseArea.containsMouse || clearFilterButton.containsMouse) @@ -132,9 +132,9 @@ Item top: globalProfileRow.bottom topMargin: UM.Theme.getSize("sidebar_margin").height left: parent.left - leftMargin: UM.Theme.getSize("sidebar_margin").width + leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) right: parent.right - rightMargin: UM.Theme.getSize("sidebar_margin").width + rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) } height: visible ? UM.Theme.getSize("setting_control").height : 0 Behavior on height { NumberAnimation { duration: 100 } } @@ -145,7 +145,7 @@ Item anchors.left: parent.left anchors.right: clearFilterButton.left - anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width + anchors.rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) placeholderText: catalog.i18nc("@label:textbox", "Search...") @@ -209,7 +209,7 @@ Item anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width + anchors.rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width) color: UM.Theme.getColor("setting_control_button") hoverColor: UM.Theme.getColor("setting_control_button_hover") @@ -238,7 +238,7 @@ Item ListView { id: contents - spacing: UM.Theme.getSize("default_lining").height; + spacing: Math.floor(UM.Theme.getSize("default_lining").height); cacheBuffer: 1000000; // Set a large cache to effectively just cache every list item. model: UM.SettingDefinitionsModel @@ -266,7 +266,7 @@ Item { id: delegate - width: UM.Theme.getSize("sidebar").width; + width: Math.floor(UM.Theme.getSize("sidebar").width); height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : - contents.spacing Behavior on height { NumberAnimation { duration: 100 } } opacity: provider.properties.enabled == "True" ? 1 : 0 diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 0481bd5a4b..2c4417ba86 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -121,7 +121,7 @@ QtObject { Item { anchors.centerIn: parent - width: textLabel.width + icon.width + Math.floor(Theme.getSize("default_margin").width / 2) + width: Math.floor(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2) Label { id: textLabel @@ -329,9 +329,9 @@ QtObject { UM.RecolorImage { id: tool_button_arrow anchors.right: parent.right; - anchors.rightMargin: (Theme.getSize("button").width - Math.floor(Theme.getSize("button_icon").width) / 4) + anchors.rightMargin: Theme.getSize("button").width - Math.floor(Theme.getSize("button_icon").width / 4) anchors.bottom: parent.bottom; - anchors.bottomMargin: (Theme.getSize("button").height - Math.floor(Theme.getSize("button_icon").height) / 4) + anchors.bottomMargin: Theme.getSize("button").height - Math.floor(Theme.getSize("button_icon").height / 4) width: Theme.getSize("standard_arrow").width height: Theme.getSize("standard_arrow").height sourceSize.width: width