Changed parseInt to Math.floor

This commit is contained in:
Mark 2017-10-11 16:47:40 +02:00
parent 331574eec0
commit 3a7fbdb173
7 changed files with 64 additions and 64 deletions

View file

@ -121,7 +121,7 @@ Rectangle
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
width: parseInt(parent.width * 0.45)
width: Math.floor(parent.width * 0.45)
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
visible: !monitoringPrint && !hideView
@ -130,7 +130,7 @@ Rectangle
Rectangle {
id: settingsModeSelection
color: "transparent"
width: parseInt(parent.width * 0.55)
width: Math.floor(parent.width * 0.55)
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
@ -154,7 +154,7 @@ Rectangle
anchors.left: parent.left
anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
anchors.verticalCenter: parent.verticalCenter
width: parseInt(0.5 * parent.width)
width: Math.floor(0.5 * parent.width)
text: model.text
exclusiveGroup: modeMenuGroup;
checkable: true;
@ -310,7 +310,7 @@ Rectangle
height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining")
anchors.bottom: printSpecs.top
anchors.bottomMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
anchors.bottomMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
}
Rectangle
@ -490,7 +490,7 @@ Rectangle
})
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
var index = Math.floor(UM.Preferences.getValue("cura/active_mode"))
if(index)
{
currentModeIndex = index;