Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark <mark.suurmond@gmail.com>2018-02-14 11:28:47 +0300
committerMark <mark.suurmond@gmail.com>2018-02-14 11:28:47 +0300
commitb531c0550de432415cd3d6fa0c2355975ea1a1ca (patch)
treeb975b51de6bb0eb3f203aa473a7a1ce324fb1719 /resources/qml/SidebarHeader.qml
parenta792fc59eb63eaa70aaaaed1f679c18e698c734e (diff)
Change Math.floor to Math.round as a last try to fix garbled fonts
CURA-4941
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r--resources/qml/SidebarHeader.qml44
1 files changed, 22 insertions, 22 deletions
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml
index 017f28bea0..f7f6e101bd 100644
--- a/resources/qml/SidebarHeader.qml
+++ b/resources/qml/SidebarHeader.qml
@@ -17,7 +17,7 @@ Column
property int currentExtruderIndex: Cura.ExtruderManager.activeExtruderIndex;
property bool currentExtruderVisible: extrudersList.visible;
- spacing: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.9)
+ spacing: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.9)
signal showTooltip(Item item, point location, string text)
signal hideTooltip()
@@ -39,15 +39,15 @@ Column
{
id: extruderSelectionRow
width: parent.width
- height: Math.floor(UM.Theme.getSize("sidebar_tabs").height * 2 / 3)
+ height: Math.round(UM.Theme.getSize("sidebar_tabs").height * 2 / 3)
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
anchors
{
left: parent.left
- leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
+ leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.7)
right: parent.right
- rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
+ rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width * 0.7)
topMargin: UM.Theme.getSize("sidebar_margin").height
}
@@ -57,15 +57,15 @@ Column
property var index: 0
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
- width: Math.floor(parent.width)
+ width: Math.round(parent.width)
boundsBehavior: Flickable.StopAtBounds
anchors
{
left: parent.left
- leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+ leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
right: parent.right
- rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
+ rightMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
verticalCenter: parent.verticalCenter
}
@@ -84,7 +84,7 @@ Column
delegate: Button
{
height: ListView.view.height
- width: Math.floor(ListView.view.width / extrudersModel.rowCount())
+ width: Math.round(ListView.view.width / extrudersModel.rowCount())
text: model.name
tooltip: model.name
@@ -121,7 +121,7 @@ Column
width: {
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
var iconWidth = extruderIconItem.width;
- return Math.floor(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
+ return Math.round(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
}
// Static text "Extruder"
@@ -153,7 +153,7 @@ Column
var minimumWidth = control.width < UM.Theme.getSize("button").width ? control.width : UM.Theme.getSize("button").width;
var minimumHeight = control.height < UM.Theme.getSize("button").height ? control.height : UM.Theme.getSize("button").height;
var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight;
- minimumSize -= Math.floor(UM.Theme.getSize("default_margin").width / 2);
+ minimumSize -= Math.round(UM.Theme.getSize("default_margin").width / 2);
return minimumSize;
}
@@ -192,15 +192,15 @@ Column
{
right: parent.right
top: parent.top
- rightMargin: Math.floor(parent.sizeToUse * 0.01)
- topMargin: Math.floor(parent.sizeToUse * 0.05)
+ rightMargin: Math.round(parent.sizeToUse * 0.01)
+ topMargin: Math.round(parent.sizeToUse * 0.05)
}
color: model.color
- width: Math.floor(parent.width * 0.35)
- height: Math.floor(parent.height * 0.35)
- radius: Math.floor(width / 2)
+ width: Math.round(parent.width * 0.35)
+ height: Math.round(parent.height * 0.35)
+ radius: Math.round(width / 2)
border.width: 1
border.color: UM.Theme.getColor("extruder_button_material_border")
@@ -219,7 +219,7 @@ Column
Item
{
id: variantRowSpacer
- height: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4)
+ height: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
width: height
visible: !extruderSelectionRow.visible
}
@@ -243,7 +243,7 @@ Column
{
id: materialLabel
text: catalog.i18nc("@label","Material");
- width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
+ width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@@ -257,7 +257,7 @@ Column
visible: Cura.MachineManager.hasMaterials
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
height: UM.Theme.getSize("setting_control").height
- width: Math.floor(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
+ width: Math.round(parent.width * 0.7) + UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
@@ -293,7 +293,7 @@ Column
{
id: variantLabel
text: Cura.MachineManager.activeDefinitionVariantsName;
- width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
+ width: Math.round(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@@ -305,7 +305,7 @@ Column
visible: Cura.MachineManager.hasVariants
height: UM.Theme.getSize("setting_control").height
- width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
+ width: Math.round(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
@@ -318,7 +318,7 @@ Column
Item
{
id: materialInfoRow
- height: Math.floor(UM.Theme.getSize("sidebar_setup").height / 2)
+ height: Math.round(UM.Theme.getSize("sidebar_setup").height / 2)
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
anchors
@@ -332,7 +332,7 @@ Column
Item {
height: UM.Theme.getSize("sidebar_setup").height
anchors.right: parent.right
- width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
+ width: Math.round(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
UM.RecolorImage {
id: warningImage