Change Math.floor to Math.round as a last try to fix garbled fonts

CURA-4941
This commit is contained in:
Mark 2018-02-14 09:28:47 +01:00
parent a792fc59eb
commit b531c0550d
36 changed files with 213 additions and 213 deletions

View file

@ -30,16 +30,16 @@ Item
{
top: parent.top
left: parent.left
leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
right: parent.right
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
}
Label
{
id: globalProfileLabel
text: catalog.i18nc("@label","Profile:");
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
width: Math.round(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
verticalAlignment: Text.AlignVCenter
@ -53,7 +53,7 @@ Item
text: generateActiveQualityText()
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
width: Math.floor(parent.width * 0.55)
width: Math.round(parent.width * 0.55)
height: UM.Theme.getSize("setting_control").height
anchors.left: globalProfileLabel.right
anchors.right: parent.right
@ -82,12 +82,12 @@ Item
id: customisedSettings
visible: Cura.MachineManager.hasUserSettings
height: Math.floor(parent.height * 0.6)
width: Math.floor(parent.height * 0.6)
height: Math.round(parent.height * 0.6)
width: Math.round(parent.height * 0.6)
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Math.floor(UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width)
anchors.rightMargin: Math.round(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: Math.floor(UM.Theme.getSize("default_lining").width)
border.width: Math.round(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: Math.floor(UM.Theme.getSize("sidebar_margin").width)
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
right: parent.right
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
rightMargin: Math.round(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: Math.floor(UM.Theme.getSize("sidebar_margin").width)
anchors.rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
placeholderText: catalog.i18nc("@label:textbox", "Search...")
@ -204,12 +204,12 @@ Item
iconSource: UM.Theme.getIcon("cross1")
visible: findingSettings
height: Math.floor(parent.height * 0.4)
height: Math.round(parent.height * 0.4)
width: visible ? height : 0
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
anchors.rightMargin: Math.round(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: Math.floor(UM.Theme.getSize("default_lining").height);
spacing: Math.round(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: Math.floor(UM.Theme.getSize("sidebar").width);
width: Math.round(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
@ -388,7 +388,7 @@ Item
contextMenu.provider = provider
contextMenu.popup();
}
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: Math.floor(delegate.height / 2) }, text)
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: Math.round(delegate.height / 2) }, text)
onHideTooltip: base.hideTooltip()
onShowAllHiddenInheritedSettings:
{