Change Text to Label and cast all sizes to int

CURA-4437
This commit is contained in:
Mark 2017-10-11 12:48:42 +02:00 committed by ChrisTerBeke
parent 92e931e02e
commit 00205996da
9 changed files with 60 additions and 60 deletions

View file

@ -40,7 +40,7 @@ Button
width: UM.Theme.getSize("default_margin").width width: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("default_margin").height height: UM.Theme.getSize("default_margin").height
Text Label
{ {
anchors.centerIn: parent; anchors.centerIn: parent;
text: index + 1; text: index + 1;

View file

@ -124,7 +124,7 @@ Item {
} }
} }
Text Label
{ {
id: boundingSpec id: boundingSpec
anchors.top: jobNameRow.bottom anchors.top: jobNameRow.bottom

View file

@ -108,15 +108,15 @@ TabView
{ {
width: scrollView.columnWidth; width: scrollView.columnWidth;
height: parent.rowHeight; height: parent.rowHeight;
spacing: UM.Theme.getSize("default_margin").width/2 spacing: parseInt(UM.Theme.getSize("default_margin").width/2)
Rectangle Rectangle
{ {
id: colorSelector id: colorSelector
color: properties.color_code color: properties.color_code
width: (colorLabel.height * 0.75) | 0 width: parseInt(colorLabel.height * 0.75)
height: (colorLabel.height * 0.75) | 0 height: parseInt(colorLabel.height * 0.75)
border.width: UM.Theme.getSize("default_lining").height border.width: UM.Theme.getSize("default_lining").height
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View file

@ -67,7 +67,7 @@ UM.ManagementPage
} }
Label Label
{ {
width: (parent.width * 0.3) | 0 width: parseInt((parent.width * 0.3))
text: model.metadata.material text: model.metadata.material
elide: Text.ElideRight elide: Text.ElideRight
font.italic: model.id == activeId font.italic: model.id == activeId

View file

@ -24,20 +24,20 @@ Column
{ {
id: connectedPrinterHeader id: connectedPrinterHeader
width: parent.width width: parent.width
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2 height: parseInt(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
color: UM.Theme.getColor("setting_category") color: UM.Theme.getColor("setting_category")
Text Label
{ {
id: connectedPrinterNameLabel id: connectedPrinterNameLabel
text: connectedPrinter != null ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: UM.Theme.getSize("default_margin").width
text: connectedPrinter != null ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
} }
Text Label
{ {
id: connectedPrinterAddressLabel id: connectedPrinterAddressLabel
text: (connectedPrinter != null && connectedPrinter.address != null) ? connectedPrinter.address : "" text: (connectedPrinter != null && connectedPrinter.address != null) ? connectedPrinter.address : ""
@ -47,7 +47,7 @@ Column
anchors.right: parent.right anchors.right: parent.right
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: UM.Theme.getSize("default_margin").width
} }
Text Label
{ {
text: connectedPrinter != null ? connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.") text: connectedPrinter != null ? connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
@ -82,10 +82,10 @@ Column
{ {
id: extruderRectangle id: extruderRectangle
color: UM.Theme.getColor("sidebar") color: UM.Theme.getColor("sidebar")
width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2 width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : parseInt(extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2)
height: UM.Theme.getSize("sidebar_extruder_box").height height: UM.Theme.getSize("sidebar_extruder_box").height
Text //Extruder name. Label //Extruder name.
{ {
text: ExtruderManager.getExtruderName(index) != "" ? ExtruderManager.getExtruderName(index) : catalog.i18nc("@label", "Extruder") text: ExtruderManager.getExtruderName(index) != "" ? ExtruderManager.getExtruderName(index) : catalog.i18nc("@label", "Extruder")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
@ -95,7 +95,7 @@ Column
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: UM.Theme.getSize("default_margin").width
} }
Text //Target temperature. Label //Target temperature.
{ {
id: extruderTargetTemperature id: extruderTargetTemperature
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.targetHotendTemperatures[index] != null) ? Math.round(connectedPrinter.targetHotendTemperatures[index]) + "°C" : "" text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.targetHotendTemperatures[index] != null) ? Math.round(connectedPrinter.targetHotendTemperatures[index]) + "°C" : ""
@ -127,7 +127,7 @@ Column
} }
} }
} }
Text //Temperature indication. Label //Temperature indication.
{ {
id: extruderTemperature id: extruderTemperature
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : "" text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
@ -162,8 +162,8 @@ Column
Rectangle //Material colour indication. Rectangle //Material colour indication.
{ {
id: materialColor id: materialColor
width: materialName.height * 0.75 width: parseInt(materialName.height * 0.75)
height: materialName.height * 0.75 height: parseInt(materialName.height * 0.75)
radius: width / 2 radius: width / 2
color: (connectedPrinter != null && connectedPrinter.materialColors[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialColors[index] : "#00000000" color: (connectedPrinter != null && connectedPrinter.materialColors[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialColors[index] : "#00000000"
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
@ -195,7 +195,7 @@ Column
} }
} }
} }
Text //Material name. Label //Material name.
{ {
id: materialName id: materialName
text: (connectedPrinter != null && connectedPrinter.materialNames[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialNames[index] : "" text: (connectedPrinter != null && connectedPrinter.materialNames[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialNames[index] : ""
@ -227,7 +227,7 @@ Column
} }
} }
} }
Text //Variant name. Label //Variant name.
{ {
id: variantName id: variantName
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : "" text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : ""
@ -278,7 +278,7 @@ Column
height: machineHeatedBed.properties.value == "True" ? UM.Theme.getSize("sidebar_extruder_box").height : 0 height: machineHeatedBed.properties.value == "True" ? UM.Theme.getSize("sidebar_extruder_box").height : 0
visible: machineHeatedBed.properties.value == "True" visible: machineHeatedBed.properties.value == "True"
Text //Build plate label. Label //Build plate label.
{ {
text: catalog.i18nc("@label", "Build plate") text: catalog.i18nc("@label", "Build plate")
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
@ -287,7 +287,7 @@ Column
anchors.top: parent.top anchors.top: parent.top
anchors.margins: UM.Theme.getSize("default_margin").width anchors.margins: UM.Theme.getSize("default_margin").width
} }
Text //Target temperature. Label //Target temperature.
{ {
id: bedTargetTemperature id: bedTargetTemperature
text: connectedPrinter != null ? connectedPrinter.targetBedTemperature + "°C" : "" text: connectedPrinter != null ? connectedPrinter.targetBedTemperature + "°C" : ""
@ -319,7 +319,7 @@ Column
} }
} }
} }
Text //Current temperature. Label //Current temperature.
{ {
id: bedCurrentTemperature id: bedCurrentTemperature
text: connectedPrinter != null ? connectedPrinter.bedTemperature + "°C" : "" text: connectedPrinter != null ? connectedPrinter.bedTemperature + "°C" : ""
@ -397,7 +397,7 @@ Column
color: UM.Theme.getColor("setting_control_highlight") color: UM.Theme.getColor("setting_control_highlight")
opacity: preheatTemperatureControl.hovered ? 1.0 : 0 opacity: preheatTemperatureControl.hovered ? 1.0 : 0
} }
Text //Maximum temperature indication. Label //Maximum temperature indication.
{ {
text: (bedTemperature.properties.maximum_value != "None" ? bedTemperature.properties.maximum_value : "") + "°C" text: (bedTemperature.properties.maximum_value != "None" ? bedTemperature.properties.maximum_value : "") + "°C"
color: UM.Theme.getColor("setting_unit") color: UM.Theme.getColor("setting_unit")
@ -475,7 +475,7 @@ Column
visible: preheatCountdown.visible visible: preheatCountdown.visible
source: UM.Theme.getIcon("print_time") source: UM.Theme.getIcon("print_time")
anchors.right: preheatCountdown.left anchors.right: preheatCountdown.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2 anchors.rightMargin: parseInt(UM.Theme.getSize("default_margin").width / 2)
anchors.verticalCenter: preheatCountdown.verticalCenter anchors.verticalCenter: preheatCountdown.verticalCenter
} }
@ -500,7 +500,7 @@ Column
} }
} }
} }
Text Label
{ {
id: preheatCountdown id: preheatCountdown
text: connectedPrinter != null ? connectedPrinter.preheatBedRemainingTime : "" text: connectedPrinter != null ? connectedPrinter.preheatBedRemainingTime : ""
@ -595,7 +595,7 @@ Column
} }
} }
Text Label
{ {
id: actualLabel id: actualLabel
anchors.centerIn: parent anchors.centerIn: parent
@ -708,22 +708,22 @@ Column
Row Row
{ {
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
width: base.width - 2 * UM.Theme.getSize("default_margin").width width: parseInt(base.width - 2 * UM.Theme.getSize("default_margin").width)
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
Text Label
{ {
width: parent.width * 0.4 width: parseInt(parent.width * 0.4)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: label text: label
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
elide: Text.ElideRight elide: Text.ElideRight
} }
Text Label
{ {
width: parent.width * 0.6 width: parseInt(parent.width * 0.6)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: value text: value
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
@ -742,7 +742,7 @@ Column
width: base.width width: base.width
height: UM.Theme.getSize("section").height height: UM.Theme.getSize("section").height
Text Label
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left

View file

@ -35,11 +35,11 @@ Item
rightMargin: UM.Theme.getSize("sidebar_margin").width rightMargin: UM.Theme.getSize("sidebar_margin").width
} }
Text Label
{ {
id: globalProfileLabel id: globalProfileLabel
text: catalog.i18nc("@label","Profile:"); text: catalog.i18nc("@label","Profile:");
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2 width: parseInt(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
font: UM.Theme.getFont("default"); font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text"); color: UM.Theme.getColor("text");
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@ -63,7 +63,7 @@ Item
} }
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1 enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
width: parent.width * 0.55 width: parseInt(parent.width * 0.55)
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
anchors.left: globalProfileLabel.right anchors.left: globalProfileLabel.right
anchors.right: parent.right anchors.right: parent.right
@ -77,8 +77,8 @@ Item
id: customisedSettings id: customisedSettings
visible: Cura.MachineManager.hasUserSettings visible: Cura.MachineManager.hasUserSettings
height: parent.height * 0.6 height: parseInt(parent.height * 0.6)
width: parent.height * 0.6 width: parseInt(parent.height * 0.6)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right

View file

@ -121,7 +121,7 @@ Rectangle
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.top: headerSeparator.bottom anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
width: parent.width * 0.45 width: parseInt(parent.width * 0.45)
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
visible: !monitoringPrint && !hideView visible: !monitoringPrint && !hideView
@ -130,7 +130,7 @@ Rectangle
Rectangle { Rectangle {
id: settingsModeSelection id: settingsModeSelection
color: "transparent" color: "transparent"
width: parent.width * 0.55 width: parseInt(parent.width * 0.55)
height: UM.Theme.getSize("sidebar_header_mode_toggle").height height: UM.Theme.getSize("sidebar_header_mode_toggle").height
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
@ -154,7 +154,7 @@ Rectangle
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: model.index * (settingsModeSelection.width / 2) anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 0.5 * parent.width width: parseInt(0.5 * parent.width)
text: model.text text: model.text
exclusiveGroup: modeMenuGroup; exclusiveGroup: modeMenuGroup;
checkable: true; checkable: true;
@ -310,7 +310,7 @@ Rectangle
height: UM.Theme.getSize("sidebar_lining").height height: UM.Theme.getSize("sidebar_lining").height
color: UM.Theme.getColor("sidebar_lining") color: UM.Theme.getColor("sidebar_lining")
anchors.bottom: printSpecs.top anchors.bottom: printSpecs.top
anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize anchors.bottomMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
} }
Rectangle Rectangle
@ -323,7 +323,7 @@ Rectangle
height: timeDetails.height + timeSpecDescription.height + lengthSpec.height height: timeDetails.height + timeSpecDescription.height + lengthSpec.height
visible: !monitoringPrint visible: !monitoringPrint
Text Label
{ {
id: timeDetails id: timeDetails
anchors.left: parent.left anchors.left: parent.left
@ -367,7 +367,7 @@ Rectangle
} }
} }
Text Label
{ {
id: timeSpecDescription id: timeSpecDescription
anchors.left: parent.left anchors.left: parent.left
@ -376,7 +376,7 @@ Rectangle
color: UM.Theme.getColor("text_subtext") color: UM.Theme.getColor("text_subtext")
text: catalog.i18nc("@description", "Print time") text: catalog.i18nc("@description", "Print time")
} }
Text Label
{ {
id: lengthSpec id: lengthSpec
anchors.left: parent.left anchors.left: parent.left

View file

@ -134,11 +134,11 @@ Column
width: { width: {
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0; var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
var iconWidth = extruderIconItem.width; var iconWidth = extruderIconItem.width;
return extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2; return parseInt(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
} }
// Static text "Extruder" // Static text "Extruder"
Text Label
{ {
id: extruderStaticText id: extruderStaticText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -166,7 +166,7 @@ Column
var minimumWidth = control.width < UM.Theme.getSize("button").width ? control.width : UM.Theme.getSize("button").width; 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 minimumHeight = control.height < UM.Theme.getSize("button").height ? control.height : UM.Theme.getSize("button").height;
var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight; var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight;
minimumSize -= UM.Theme.getSize("default_margin").width / 2; minimumSize -= parseInt(UM.Theme.getSize("default_margin").width / 2);
return minimumSize; return minimumSize;
} }
@ -184,7 +184,7 @@ Column
color: extruderNumberText.color color: extruderNumberText.color
} }
Text Label
{ {
id: extruderNumberText id: extruderNumberText
anchors.centerIn: parent anchors.centerIn: parent
@ -250,11 +250,11 @@ Column
rightMargin: UM.Theme.getSize("sidebar_margin").width rightMargin: UM.Theme.getSize("sidebar_margin").width
} }
Text Label
{ {
id: materialLabel id: materialLabel
text: catalog.i18nc("@label","Material"); text: catalog.i18nc("@label","Material");
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width width: parseInt(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default"); font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text"); color: UM.Theme.getColor("text");
} }
@ -306,11 +306,11 @@ Column
rightMargin: UM.Theme.getSize("sidebar_margin").width rightMargin: UM.Theme.getSize("sidebar_margin").width
} }
Text Label
{ {
id: printCoreLabel id: printCoreLabel
text: Cura.MachineManager.activeDefinitionVariantsName; text: Cura.MachineManager.activeDefinitionVariantsName;
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width width: parseInt(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
font: UM.Theme.getFont("default"); font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text"); color: UM.Theme.getColor("text");
} }
@ -322,7 +322,7 @@ Column
visible: Cura.MachineManager.hasVariants visible: Cura.MachineManager.hasVariants
height: UM.Theme.getSize("setting_control").height height: UM.Theme.getSize("setting_control").height
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width width: parseInt(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
anchors.right: parent.right anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true; activeFocusOnPress: true;
@ -335,7 +335,7 @@ Column
Item Item
{ {
id: materialInfoRow id: materialInfoRow
height: UM.Theme.getSize("sidebar_setup").height / 2 height: parseInt(UM.Theme.getSize("sidebar_setup").height / 2)
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
anchors anchors
@ -349,7 +349,7 @@ Column
Item { Item {
height: UM.Theme.getSize("sidebar_setup").height height: UM.Theme.getSize("sidebar_setup").height
anchors.right: parent.right anchors.right: parent.right
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width width: parseInt(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
UM.RecolorImage { UM.RecolorImage {
id: warningImage id: warningImage

View file

@ -361,7 +361,7 @@ Item
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
anchors.left: parent.left anchors.left: parent.left
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width width: parseInt(UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width)
Label Label
{ {
@ -371,7 +371,7 @@ Item
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 1.7 anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 1.7)
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
} }
@ -382,7 +382,7 @@ Item
id: infillCellRight id: infillCellRight
height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height) height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height)
width: UM.Theme.getSize("sidebar").width * .55 width: parseInt(UM.Theme.getSize("sidebar").width * .55)
anchors.left: infillCellLeft.right anchors.left: infillCellLeft.right
anchors.top: infillCellLeft.top anchors.top: infillCellLeft.top
@ -393,7 +393,7 @@ Item
//anchors.top: parent.top //anchors.top: parent.top
anchors.left: infillSlider.left anchors.left: infillSlider.left
anchors.leftMargin: (infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor anchors.leftMargin: parseInt((infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor)
anchors.right: parent.right anchors.right: parent.right
text: parseInt(infillDensity.properties.value) + "%" text: parseInt(infillDensity.properties.value) + "%"
@ -419,7 +419,7 @@ Item
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
height: UM.Theme.getSize("sidebar_margin").height height: UM.Theme.getSize("sidebar_margin").height
width: infillCellRight.width - UM.Theme.getSize("sidebar_margin").width - style.handleWidth width: parseInt(infillCellRight.width - UM.Theme.getSize("sidebar_margin").width - style.handleWidth)
minimumValue: 0 minimumValue: 0
maximumValue: 100 maximumValue: 100