mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Change Math.floor to Math.round as a last try to fix garbled fonts
CURA-4941
This commit is contained in:
parent
a792fc59eb
commit
b531c0550d
36 changed files with 213 additions and 213 deletions
|
@ -70,8 +70,8 @@ Cura.MachineAction
|
||||||
anchors.top: pageTitle.bottom
|
anchors.top: pageTitle.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
property real columnWidth: Math.floor((width - 3 * UM.Theme.getSize("default_margin").width) / 2)
|
property real columnWidth: Math.round((width - 3 * UM.Theme.getSize("default_margin").width) / 2)
|
||||||
property real labelColumnWidth: Math.floor(columnWidth / 2)
|
property real labelColumnWidth: Math.round(columnWidth / 2)
|
||||||
|
|
||||||
Tab
|
Tab
|
||||||
{
|
{
|
||||||
|
|
|
@ -237,7 +237,7 @@ Item {
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
width: Math.floor(UM.Theme.getSize("setting").height / 2)
|
width: Math.round(UM.Theme.getSize("setting").height / 2)
|
||||||
height: UM.Theme.getSize("setting").height
|
height: UM.Theme.getSize("setting").height
|
||||||
|
|
||||||
onClicked: addedSettingsModel.setVisible(model.key, false)
|
onClicked: addedSettingsModel.setVisible(model.key, false)
|
||||||
|
|
|
@ -25,8 +25,8 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
UM.I18nCatalog{id: catalog; name:"cura"}
|
UM.I18nCatalog{id: catalog; name:"cura"}
|
||||||
id: base
|
id: base
|
||||||
property int columnWidth: Math.floor((base.width / 2) - UM.Theme.getSize("default_margin").width)
|
property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width)
|
||||||
property int textMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
property int textMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
property string activeScriptName
|
property string activeScriptName
|
||||||
SystemPalette{ id: palette }
|
SystemPalette{ id: palette }
|
||||||
SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled }
|
SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled }
|
||||||
|
@ -129,8 +129,8 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(control.width / 2.7)
|
width: Math.round(control.width / 2.7)
|
||||||
height: Math.floor(control.height / 2.7)
|
height: Math.round(control.height / 2.7)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: palette.text
|
color: palette.text
|
||||||
|
@ -164,8 +164,8 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(control.width / 2.5)
|
width: Math.round(control.width / 2.5)
|
||||||
height: Math.floor(control.height / 2.5)
|
height: Math.round(control.height / 2.5)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: control.enabled ? palette.text : disabledPalette.text
|
color: control.enabled ? palette.text : disabledPalette.text
|
||||||
|
@ -199,8 +199,8 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(control.width / 2.5)
|
width: Math.round(control.width / 2.5)
|
||||||
height: Math.floor(control.height / 2.5)
|
height: Math.round(control.height / 2.5)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: control.enabled ? palette.text : disabledPalette.text
|
color: control.enabled ? palette.text : disabledPalette.text
|
||||||
|
@ -478,15 +478,15 @@ UM.Dialog
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Math.floor(UM.Theme.getSize("save_button_text_margin").width / 2);
|
anchors.leftMargin: Math.round(UM.Theme.getSize("save_button_text_margin").width / 2);
|
||||||
width: parent.height
|
width: parent.height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(parent.width / 2)
|
width: Math.round(parent.width / 2)
|
||||||
height: Math.floor(parent.height / 2)
|
height: Math.round(parent.height / 2)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
|
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
|
||||||
|
|
|
@ -49,7 +49,7 @@ UM.PointingRectangle {
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ UM.PointingRectangle {
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.right
|
left: parent.right
|
||||||
leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ Item
|
||||||
Button {
|
Button {
|
||||||
id: collapseButton
|
id: collapseButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
|
anchors.topMargin: Math.round(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ Item
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
height: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
height: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
width: width
|
width: width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ Item
|
||||||
width: UM.Theme.getSize("layerview_legend_size").width
|
width: UM.Theme.getSize("layerview_legend_size").width
|
||||||
height: UM.Theme.getSize("layerview_legend_size").height
|
height: UM.Theme.getSize("layerview_legend_size").height
|
||||||
color: model.color
|
color: model.color
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
visible: !viewSettings.show_legend & !viewSettings.show_gradient
|
visible: !viewSettings.show_legend & !viewSettings.show_gradient
|
||||||
|
@ -249,7 +249,7 @@ Item
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: extrudersModelCheckBox.left;
|
anchors.left: extrudersModelCheckBox.left;
|
||||||
anchors.right: extrudersModelCheckBox.right;
|
anchors.right: extrudersModelCheckBox.right;
|
||||||
anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(UM.Theme.getSize("default_margin").width/2)
|
anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width/2)
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ Item
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: legendModelCheckBox.left;
|
anchors.left: legendModelCheckBox.left;
|
||||||
anchors.right: legendModelCheckBox.right;
|
anchors.right: legendModelCheckBox.right;
|
||||||
anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.floor(UM.Theme.getSize("default_margin").width/2)
|
anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width/2)
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -461,7 +461,7 @@ Item
|
||||||
visible: viewSettings.show_feedrate_gradient
|
visible: viewSettings.show_feedrate_gradient
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
height: parent.width
|
height: parent.width
|
||||||
width: Math.floor(UM.Theme.getSize("layerview_row").height * 1.5)
|
width: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}
|
transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}
|
||||||
|
@ -492,7 +492,7 @@ Item
|
||||||
visible: viewSettings.show_thickness_gradient
|
visible: viewSettings.show_thickness_gradient
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
height: parent.width
|
height: parent.width
|
||||||
width: Math.floor(UM.Theme.getSize("layerview_row").height * 1.5)
|
width: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}
|
transform: Rotation {origin.x: 0; origin.y: 0; angle: 90}
|
||||||
|
|
|
@ -114,7 +114,7 @@ Cura.MachineAction
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
|
@ -198,7 +198,7 @@ Cura.MachineAction
|
||||||
}
|
}
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
visible: base.selectedPrinter ? true : false
|
visible: base.selectedPrinter ? true : false
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
Label
|
Label
|
||||||
|
@ -216,13 +216,13 @@ Cura.MachineAction
|
||||||
columns: 2
|
columns: 2
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: catalog.i18nc("@label", "Type")
|
text: catalog.i18nc("@label", "Type")
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
|
@ -247,25 +247,25 @@ Cura.MachineAction
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: catalog.i18nc("@label", "Firmware version")
|
text: catalog.i18nc("@label", "Firmware version")
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: base.selectedPrinter ? base.selectedPrinter.firmwareVersion : ""
|
text: base.selectedPrinter ? base.selectedPrinter.firmwareVersion : ""
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: catalog.i18nc("@label", "Address")
|
text: catalog.i18nc("@label", "Address")
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.5)
|
width: Math.round(parent.width * 0.5)
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: base.selectedPrinter ? base.selectedPrinter.ipAddress : ""
|
text: base.selectedPrinter ? base.selectedPrinter.ipAddress : ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@ Component
|
||||||
}
|
}
|
||||||
return (sourceSize.width / sourceSize.height) > (maximumWidth / maximumHeight);
|
return (sourceSize.width / sourceSize.height) > (maximumWidth / maximumHeight);
|
||||||
}
|
}
|
||||||
property real _width: Math.floor(Math.min(maximumWidth, sourceSize.width))
|
property real _width: Math.round(Math.min(maximumWidth, sourceSize.width))
|
||||||
property real _height: Math.floor(Math.min(maximumHeight, sourceSize.height))
|
property real _height: Math.round(Math.min(maximumHeight, sourceSize.height))
|
||||||
width: proportionalHeight ? _width : Math.floor(sourceSize.width * _height / sourceSize.height)
|
width: proportionalHeight ? _width : Math.round(sourceSize.width * _height / sourceSize.height)
|
||||||
height: !proportionalHeight ? _height : Math.floor(sourceSize.height * _width / sourceSize.width)
|
height: !proportionalHeight ? _height : Math.round(sourceSize.height * _width / sourceSize.width)
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
onVisibleChanged:
|
onVisibleChanged:
|
||||||
|
|
|
@ -10,7 +10,7 @@ Item
|
||||||
id: extruderInfo
|
id: extruderInfo
|
||||||
property var printCoreConfiguration
|
property var printCoreConfiguration
|
||||||
|
|
||||||
width: Math.floor(parent.width / 2)
|
width: Math.round(parent.width / 2)
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,7 @@ Rectangle
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width / 3)
|
width: Math.round(parent.width / 3)
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
Label // Print job name
|
Label // Print job name
|
||||||
|
@ -131,7 +131,7 @@ Rectangle
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width / 3 * 2)
|
width: Math.round(parent.width / 3 * 2)
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
Label // Friendly machine name
|
Label // Friendly machine name
|
||||||
|
@ -139,7 +139,7 @@ Rectangle
|
||||||
id: printerNameLabel
|
id: printerNameLabel
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width - showCameraIcon.width)
|
width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width - showCameraIcon.width)
|
||||||
text: printer.friendly_name
|
text: printer.friendly_name
|
||||||
font: UM.Theme.getFont("default_bold")
|
font: UM.Theme.getFont("default_bold")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -149,7 +149,7 @@ Rectangle
|
||||||
{
|
{
|
||||||
id: printerTypeLabel
|
id: printerTypeLabel
|
||||||
anchors.top: printerNameLabel.bottom
|
anchors.top: printerNameLabel.bottom
|
||||||
width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
||||||
text: printer.machine_variant
|
text: printer.machine_variant
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -183,7 +183,7 @@ Rectangle
|
||||||
id: extruderInfo
|
id: extruderInfo
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
@ -191,7 +191,7 @@ Rectangle
|
||||||
PrintCoreConfiguration
|
PrintCoreConfiguration
|
||||||
{
|
{
|
||||||
id: leftExtruderInfo
|
id: leftExtruderInfo
|
||||||
width: Math.floor((parent.width - extruderSeperator.width) / 2)
|
width: Math.round((parent.width - extruderSeperator.width) / 2)
|
||||||
printCoreConfiguration: printer.configuration[0]
|
printCoreConfiguration: printer.configuration[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ Rectangle
|
||||||
PrintCoreConfiguration
|
PrintCoreConfiguration
|
||||||
{
|
{
|
||||||
id: rightExtruderInfo
|
id: rightExtruderInfo
|
||||||
width: Math.floor((parent.width - extruderSeperator.width) / 2)
|
width: Math.round((parent.width - extruderSeperator.width) / 2)
|
||||||
printCoreConfiguration: printer.configuration[1]
|
printCoreConfiguration: printer.configuration[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ Rectangle
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: showExtended ? parent.height: printProgressTitleBar.height
|
height: showExtended ? parent.height: printProgressTitleBar.height
|
||||||
width: Math.floor(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
width: Math.round(parent.width / 2 - UM.Theme.getSize("default_margin").width)
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: lineColor
|
border.color: lineColor
|
||||||
radius: cornerRadius
|
radius: cornerRadius
|
||||||
|
|
|
@ -57,7 +57,7 @@ Item
|
||||||
{
|
{
|
||||||
id: cameraImage
|
id: cameraImage
|
||||||
width: Math.min(sourceSize.width === 0 ? 800 * screenScaleFactor : sourceSize.width, maximumWidth)
|
width: Math.min(sourceSize.width === 0 ? 800 * screenScaleFactor : sourceSize.width, maximumWidth)
|
||||||
height: Math.floor((sourceSize.height === 0 ? 600 * screenScaleFactor : sourceSize.height) * width / sourceSize.width)
|
height: Math.round((sourceSize.height === 0 ? 600 * screenScaleFactor : sourceSize.height) * width / sourceSize.width)
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
z: 1
|
z: 1
|
||||||
|
|
|
@ -180,7 +180,7 @@ Cura.MachineAction
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
anchors.top: nozzleTempLabel.top
|
anchors.top: nozzleTempLabel.top
|
||||||
anchors.left: bedTempStatus.right
|
anchors.left: bedTempStatus.right
|
||||||
anchors.leftMargin: Math.floor(UM.Theme.getSize("default_margin").width/2)
|
anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width/2)
|
||||||
visible: checkupMachineAction.usbConnected
|
visible: checkupMachineAction.usbConnected
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,7 @@ Cura.MachineAction
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
anchors.top: bedTempLabel.top
|
anchors.top: bedTempLabel.top
|
||||||
anchors.left: bedTempStatus.right
|
anchors.left: bedTempStatus.right
|
||||||
anchors.leftMargin: Math.floor(UM.Theme.getSize("default_margin").width/2)
|
anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width/2)
|
||||||
visible: checkupMachineAction.usbConnected && manager.hasHeatedBed
|
visible: checkupMachineAction.usbConnected && manager.hasHeatedBed
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,8 @@ import UM 1.3 as UM
|
||||||
UM.Dialog
|
UM.Dialog
|
||||||
{
|
{
|
||||||
id: baseDialog
|
id: baseDialog
|
||||||
minimumWidth: Math.floor(UM.Theme.getSize("modal_window_minimum").width * 0.75)
|
minimumWidth: Math.round(UM.Theme.getSize("modal_window_minimum").width * 0.75)
|
||||||
minimumHeight: Math.floor(UM.Theme.getSize("modal_window_minimum").height * 0.5)
|
minimumHeight: Math.round(UM.Theme.getSize("modal_window_minimum").height * 0.5)
|
||||||
width: minimumWidth
|
width: minimumWidth
|
||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
title: catalog.i18nc("@title:window", "User Agreement")
|
title: catalog.i18nc("@title:window", "User Agreement")
|
||||||
|
|
|
@ -483,7 +483,7 @@ UM.MainWindow
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
horizontalCenterOffset: -(Math.floor(UM.Theme.getSize("sidebar").width / 2))
|
horizontalCenterOffset: -(Math.round(UM.Theme.getSize("sidebar").width / 2))
|
||||||
top: parent.verticalCenter;
|
top: parent.verticalCenter;
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ Button
|
||||||
|
|
||||||
width: UM.Theme.getSize("extruder_button_material").width
|
width: UM.Theme.getSize("extruder_button_material").width
|
||||||
height: UM.Theme.getSize("extruder_button_material").height
|
height: UM.Theme.getSize("extruder_button_material").height
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("extruder_button_material_border")
|
border.color: UM.Theme.getColor("extruder_button_material_border")
|
||||||
|
|
|
@ -94,7 +94,7 @@ Item {
|
||||||
{
|
{
|
||||||
id: printJobTextfield
|
id: printJobTextfield
|
||||||
anchors.right: printJobPencilIcon.left
|
anchors.right: printJobPencilIcon.left
|
||||||
anchors.rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
anchors.rightMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
height: UM.Theme.getSize("jobspecs_line").height
|
height: UM.Theme.getSize("jobspecs_line").height
|
||||||
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
|
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
|
||||||
maximumLength: 120
|
maximumLength: 120
|
||||||
|
|
|
@ -179,7 +179,7 @@ Item
|
||||||
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width;
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width;
|
||||||
height: UM.Theme.getSize("progressbar").height;
|
height: UM.Theme.getSize("progressbar").height;
|
||||||
anchors.top: statusLabel.bottom;
|
anchors.top: statusLabel.bottom;
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4);
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height / 4);
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width;
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ Rectangle
|
||||||
Button {
|
Button {
|
||||||
id: collapseButton
|
id: collapseButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
|
anchors.topMargin: Math.round(UM.Theme.getSize("default_margin").height + (UM.Theme.getSize("layerview_row").height - UM.Theme.getSize("default_margin").height) / 2)
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
|
|
@ -98,15 +98,15 @@ TabView
|
||||||
Row {
|
Row {
|
||||||
width: scrollView.columnWidth
|
width: scrollView.columnWidth
|
||||||
height: parent.rowHeight
|
height: parent.rowHeight
|
||||||
spacing: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
spacing: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
|
|
||||||
// color indicator square
|
// color indicator square
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: colorSelector
|
id: colorSelector
|
||||||
color: properties.color_code
|
color: properties.color_code
|
||||||
|
|
||||||
width: Math.floor(colorLabel.height * 0.75)
|
width: Math.round(colorLabel.height * 0.75)
|
||||||
height: Math.floor(colorLabel.height * 0.75)
|
height: Math.round(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
|
||||||
|
|
|
@ -59,15 +59,15 @@ UM.ManagementPage
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.height * 0.8)
|
width: Math.round(parent.height * 0.8)
|
||||||
height: Math.floor(parent.height * 0.8)
|
height: Math.round(parent.height * 0.8)
|
||||||
color: model.metadata.color_code
|
color: model.metadata.color_code
|
||||||
border.color: isCurrentItem ? palette.highlightedText : palette.text;
|
border.color: isCurrentItem ? palette.highlightedText : palette.text;
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor((parent.width * 0.3))
|
width: Math.round((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
|
||||||
|
|
|
@ -24,7 +24,7 @@ Column
|
||||||
{
|
{
|
||||||
id: connectedPrinterHeader
|
id: connectedPrinterHeader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
height: Math.round(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
||||||
color: UM.Theme.getColor("setting_category")
|
color: UM.Theme.getColor("setting_category")
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
@ -82,7 +82,7 @@ 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 : Math.floor(extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2)
|
width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : Math.round(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
|
||||||
|
|
||||||
Label //Extruder name.
|
Label //Extruder name.
|
||||||
|
@ -162,8 +162,8 @@ Column
|
||||||
Rectangle //Material colour indication.
|
Rectangle //Material colour indication.
|
||||||
{
|
{
|
||||||
id: materialColor
|
id: materialColor
|
||||||
width: Math.floor(materialName.height * 0.75)
|
width: Math.round(materialName.height * 0.75)
|
||||||
height: Math.floor(materialName.height * 0.75)
|
height: Math.round(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
|
||||||
|
@ -357,7 +357,7 @@ Column
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
||||||
property var showError:
|
property var showError:
|
||||||
{
|
{
|
||||||
if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < Math.floor(preheatTemperatureInput.text))
|
if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < Math.round(preheatTemperatureInput.text))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
|
@ -476,7 +476,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: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
anchors.rightMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
anchors.verticalCenter: preheatCountdown.verticalCenter
|
anchors.verticalCenter: preheatCountdown.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,15 +528,15 @@ Column
|
||||||
{
|
{
|
||||||
return true; //Can always cancel if the timer is running.
|
return true; //Can always cancel if the timer is running.
|
||||||
}
|
}
|
||||||
if (bedTemperature.properties.minimum_value != "None" && Math.floor(preheatTemperatureInput.text) < Math.floor(bedTemperature.properties.minimum_value))
|
if (bedTemperature.properties.minimum_value != "None" && Math.round(preheatTemperatureInput.text) < Math.round(bedTemperature.properties.minimum_value))
|
||||||
{
|
{
|
||||||
return false; //Target temperature too low.
|
return false; //Target temperature too low.
|
||||||
}
|
}
|
||||||
if (bedTemperature.properties.maximum_value != "None" && Math.floor(preheatTemperatureInput.text) > Math.floor(bedTemperature.properties.maximum_value))
|
if (bedTemperature.properties.maximum_value != "None" && Math.round(preheatTemperatureInput.text) > Math.round(bedTemperature.properties.maximum_value))
|
||||||
{
|
{
|
||||||
return false; //Target temperature too high.
|
return false; //Target temperature too high.
|
||||||
}
|
}
|
||||||
if (Math.floor(preheatTemperatureInput.text) == 0)
|
if (Math.round(preheatTemperatureInput.text) == 0)
|
||||||
{
|
{
|
||||||
return false; //Setting the temperature to 0 is not allowed (since that cancels the pre-heating).
|
return false; //Setting the temperature to 0 is not allowed (since that cancels the pre-heating).
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@ Column
|
||||||
color: UM.Theme.getColor("setting_control_text")
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
|
|
||||||
width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
|
width: Math.round(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ Column
|
||||||
color: UM.Theme.getColor("setting_control_text")
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
|
|
||||||
width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
|
width: Math.round(parent.width * 0.4) - UM.Theme.getSize("default_margin").width
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
@ -1044,13 +1044,13 @@ Column
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: Math.floor(base.width - 2 * UM.Theme.getSize("default_margin").width)
|
width: Math.round(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
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.4)
|
width: Math.round(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")
|
||||||
|
@ -1059,7 +1059,7 @@ Column
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width * 0.6)
|
width: Math.round(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")
|
||||||
|
@ -1146,8 +1146,8 @@ Column
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(control.width / 2)
|
width: Math.round(control.width / 2)
|
||||||
height: Math.floor(control.height / 2)
|
height: Math.round(control.height / 2)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color:
|
color:
|
||||||
|
|
|
@ -76,7 +76,7 @@ Item {
|
||||||
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
|
width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width
|
||||||
height: UM.Theme.getSize("progressbar").height
|
height: UM.Theme.getSize("progressbar").height
|
||||||
anchors.top: statusLabel.bottom
|
anchors.top: statusLabel.bottom
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4)
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
radius: UM.Theme.getSize("progressbar_radius").width
|
radius: UM.Theme.getSize("progressbar_radius").width
|
||||||
|
@ -354,7 +354,7 @@ Item {
|
||||||
}
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Math.floor(UM.Theme.getSize("save_button_text_margin").width / 2);
|
anchors.leftMargin: Math.round(UM.Theme.getSize("save_button_text_margin").width / 2);
|
||||||
width: parent.height
|
width: parent.height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
|
|
|
@ -187,13 +187,13 @@ Button
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
|
|
||||||
visible: base.hovered || settingsButton.hovered
|
visible: base.hovered || settingsButton.hovered
|
||||||
height: Math.floor(base.height * 0.6)
|
height: Math.round(base.height * 0.6)
|
||||||
width: Math.floor(base.height * 0.6)
|
width: Math.round(base.height * 0.6)
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: inheritButton.visible ? inheritButton.left : parent.right
|
right: inheritButton.visible ? inheritButton.left : parent.right
|
||||||
// use 1.9 as the factor because there is a 0.1 difference between the settings and inheritance warning icons
|
// use 1.9 as the factor because there is a 0.1 difference between the settings and inheritance warning icons
|
||||||
rightMargin: inheritButton.visible ? Math.floor(UM.Theme.getSize("default_margin").width / 2) : category_arrow.width + Math.floor(UM.Theme.getSize("default_margin").width * 1.9)
|
rightMargin: inheritButton.visible ? Math.round(UM.Theme.getSize("default_margin").width / 2) : category_arrow.width + Math.round(UM.Theme.getSize("default_margin").width * 1.9)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ Button
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
height: Math.floor(parent.height / 2)
|
height: Math.round(parent.height / 2)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
|
|
|
@ -118,8 +118,8 @@ SettingItem
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(parent.width / 2.5)
|
width: Math.round(parent.width / 2.5)
|
||||||
height: Math.floor(parent.height / 2.5)
|
height: Math.round(parent.height / 2.5)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
|
||||||
|
|
|
@ -61,7 +61,7 @@ SettingItem
|
||||||
{
|
{
|
||||||
id: downArrow
|
id: downArrow
|
||||||
x: control.width - width - control.rightPadding
|
x: control.width - width - control.rightPadding
|
||||||
y: control.topPadding + Math.floor((control.availableHeight - height) / 2)
|
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||||
|
|
||||||
source: UM.Theme.getIcon("arrow_bottom")
|
source: UM.Theme.getIcon("arrow_bottom")
|
||||||
width: UM.Theme.getSize("standard_arrow").width
|
width: UM.Theme.getSize("standard_arrow").width
|
||||||
|
|
|
@ -68,7 +68,7 @@ SettingItem
|
||||||
{
|
{
|
||||||
id: downArrow
|
id: downArrow
|
||||||
x: control.width - width - control.rightPadding
|
x: control.width - width - control.rightPadding
|
||||||
y: control.topPadding + Math.floor((control.availableHeight - height) / 2)
|
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||||
|
|
||||||
source: UM.Theme.getIcon("arrow_bottom")
|
source: UM.Theme.getIcon("arrow_bottom")
|
||||||
width: UM.Theme.getSize("standard_arrow").width
|
width: UM.Theme.getSize("standard_arrow").width
|
||||||
|
@ -126,16 +126,16 @@ SettingItem
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: swatch
|
id: swatch
|
||||||
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
|
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
|
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
color: control.color
|
color: control.color
|
||||||
}
|
}
|
||||||
|
@ -180,16 +180,16 @@ SettingItem
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: swatch
|
id: swatch
|
||||||
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
|
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
|
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
color: control.model.getItem(index).color
|
color: control.model.getItem(index).color
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ Item {
|
||||||
id: label;
|
id: label;
|
||||||
|
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: doDepthIndentation ? Math.floor((UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width)) : 0
|
anchors.leftMargin: doDepthIndentation ? Math.round((UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width)) : 0
|
||||||
anchors.right: settingControls.left;
|
anchors.right: settingControls.left;
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
@ -128,12 +128,12 @@ Item {
|
||||||
{
|
{
|
||||||
id: settingControls
|
id: settingControls
|
||||||
|
|
||||||
height: Math.floor(parent.height / 2)
|
height: Math.round(parent.height / 2)
|
||||||
spacing: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2)
|
spacing: Math.round(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: controlContainer.left
|
right: controlContainer.left
|
||||||
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2)
|
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width / 2)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ SettingItem
|
||||||
{
|
{
|
||||||
id: downArrow
|
id: downArrow
|
||||||
x: control.width - width - control.rightPadding
|
x: control.width - width - control.rightPadding
|
||||||
y: control.topPadding + Math.floor((control.availableHeight - height) / 2)
|
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||||
|
|
||||||
source: UM.Theme.getIcon("arrow_bottom")
|
source: UM.Theme.getIcon("arrow_bottom")
|
||||||
width: UM.Theme.getSize("standard_arrow").width
|
width: UM.Theme.getSize("standard_arrow").width
|
||||||
|
@ -145,16 +145,16 @@ SettingItem
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: swatch
|
id: swatch
|
||||||
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
|
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
|
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
color: control.color
|
color: control.color
|
||||||
}
|
}
|
||||||
|
@ -199,16 +199,16 @@ SettingItem
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: swatch
|
id: swatch
|
||||||
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
|
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
|
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
color: control.model.getItem(index).color
|
color: control.model.getItem(index).color
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ SettingItem
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
border.width: Math.floor(UM.Theme.getSize("default_lining").width)
|
border.width: Math.round(UM.Theme.getSize("default_lining").width)
|
||||||
border.color:
|
border.color:
|
||||||
{
|
{
|
||||||
if(!enabled)
|
if(!enabled)
|
||||||
|
@ -76,7 +76,7 @@ SettingItem
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_lining").width);
|
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width);
|
||||||
color: UM.Theme.getColor("setting_control_highlight")
|
color: UM.Theme.getColor("setting_control_highlight")
|
||||||
opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35;
|
opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ SettingItem
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
|
anchors.rightMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
|
||||||
text: definition.unit;
|
text: definition.unit;
|
||||||
|
@ -107,9 +107,9 @@ SettingItem
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
|
leftMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
|
rightMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
|
|
|
@ -30,16 +30,16 @@ Item
|
||||||
{
|
{
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
|
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
|
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: globalProfileLabel
|
id: globalProfileLabel
|
||||||
text: catalog.i18nc("@label","Profile:");
|
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");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
@ -53,7 +53,7 @@ Item
|
||||||
|
|
||||||
text: generateActiveQualityText()
|
text: generateActiveQualityText()
|
||||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
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
|
height: UM.Theme.getSize("setting_control").height
|
||||||
anchors.left: globalProfileLabel.right
|
anchors.left: globalProfileLabel.right
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -82,12 +82,12 @@ Item
|
||||||
id: customisedSettings
|
id: customisedSettings
|
||||||
|
|
||||||
visible: Cura.MachineManager.hasUserSettings
|
visible: Cura.MachineManager.hasUserSettings
|
||||||
height: Math.floor(parent.height * 0.6)
|
height: Math.round(parent.height * 0.6)
|
||||||
width: Math.floor(parent.height * 0.6)
|
width: Math.round(parent.height * 0.6)
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
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");
|
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||||
iconSource: UM.Theme.getIcon("star");
|
iconSource: UM.Theme.getIcon("star");
|
||||||
|
@ -112,7 +112,7 @@ Item
|
||||||
id: filterContainer
|
id: filterContainer
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
border.width: Math.floor(UM.Theme.getSize("default_lining").width)
|
border.width: Math.round(UM.Theme.getSize("default_lining").width)
|
||||||
border.color:
|
border.color:
|
||||||
{
|
{
|
||||||
if(hoverMouseArea.containsMouse || clearFilterButton.containsMouse)
|
if(hoverMouseArea.containsMouse || clearFilterButton.containsMouse)
|
||||||
|
@ -132,9 +132,9 @@ Item
|
||||||
top: globalProfileRow.bottom
|
top: globalProfileRow.bottom
|
||||||
topMargin: UM.Theme.getSize("sidebar_margin").height
|
topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width)
|
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||||
right: parent.right
|
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
|
height: visible ? UM.Theme.getSize("setting_control").height : 0
|
||||||
Behavior on height { NumberAnimation { duration: 100 } }
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
|
@ -145,7 +145,7 @@ Item
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: clearFilterButton.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...")
|
placeholderText: catalog.i18nc("@label:textbox", "Search...")
|
||||||
|
|
||||||
|
@ -204,12 +204,12 @@ Item
|
||||||
iconSource: UM.Theme.getIcon("cross1")
|
iconSource: UM.Theme.getIcon("cross1")
|
||||||
visible: findingSettings
|
visible: findingSettings
|
||||||
|
|
||||||
height: Math.floor(parent.height * 0.4)
|
height: Math.round(parent.height * 0.4)
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
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")
|
color: UM.Theme.getColor("setting_control_button")
|
||||||
hoverColor: UM.Theme.getColor("setting_control_button_hover")
|
hoverColor: UM.Theme.getColor("setting_control_button_hover")
|
||||||
|
@ -238,7 +238,7 @@ Item
|
||||||
ListView
|
ListView
|
||||||
{
|
{
|
||||||
id: contents
|
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.
|
cacheBuffer: 1000000; // Set a large cache to effectively just cache every list item.
|
||||||
|
|
||||||
model: UM.SettingDefinitionsModel
|
model: UM.SettingDefinitionsModel
|
||||||
|
@ -266,7 +266,7 @@ Item
|
||||||
{
|
{
|
||||||
id: delegate
|
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
|
height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : - contents.spacing
|
||||||
Behavior on height { NumberAnimation { duration: 100 } }
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
opacity: provider.properties.enabled == "True" ? 1 : 0
|
opacity: provider.properties.enabled == "True" ? 1 : 0
|
||||||
|
@ -388,7 +388,7 @@ Item
|
||||||
contextMenu.provider = provider
|
contextMenu.provider = provider
|
||||||
contextMenu.popup();
|
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()
|
onHideTooltip: base.hideTooltip()
|
||||||
onShowAllHiddenInheritedSettings:
|
onShowAllHiddenInheritedSettings:
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,11 +64,11 @@ Rectangle
|
||||||
|
|
||||||
function getPrettyTime(time)
|
function getPrettyTime(time)
|
||||||
{
|
{
|
||||||
var hours = Math.floor(time / 3600)
|
var hours = Math.round(time / 3600)
|
||||||
time -= hours * 3600
|
time -= hours * 3600
|
||||||
var minutes = Math.floor(time / 60);
|
var minutes = Math.round(time / 60);
|
||||||
time -= minutes * 60
|
time -= minutes * 60
|
||||||
var seconds = Math.floor(time);
|
var seconds = Math.round(time);
|
||||||
|
|
||||||
var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
|
var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
|
||||||
return finalTime;
|
return finalTime;
|
||||||
|
@ -130,7 +130,7 @@ Rectangle
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top: hideSettings ? machineSelection.bottom : headerSeparator.bottom
|
anchors.top: hideSettings ? machineSelection.bottom : headerSeparator.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
width: Math.floor(parent.width * 0.45)
|
width: Math.round(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
|
||||||
|
@ -142,7 +142,7 @@ Rectangle
|
||||||
id: settingsModeSelection
|
id: settingsModeSelection
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
width: Math.floor(parent.width * 0.55)
|
width: Math.round(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
|
||||||
|
@ -171,10 +171,10 @@ Rectangle
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
height: settingsModeSelection.height
|
height: settingsModeSelection.height
|
||||||
width: Math.floor(parent.width / 2)
|
width: Math.round(parent.width / 2)
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: model.index * Math.floor(settingsModeSelection.width / 2)
|
anchors.leftMargin: model.index * Math.round(settingsModeSelection.width / 2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
ButtonGroup.group: modeMenuGroup
|
ButtonGroup.group: modeMenuGroup
|
||||||
|
@ -329,7 +329,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: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
|
anchors.bottomMargin: Math.round(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
@ -429,7 +429,7 @@ Rectangle
|
||||||
{
|
{
|
||||||
names.push(base.printMaterialNames[index]);
|
names.push(base.printMaterialNames[index]);
|
||||||
lengths.push(base.printMaterialLengths[index].toFixed(2));
|
lengths.push(base.printMaterialLengths[index].toFixed(2));
|
||||||
weights.push(String(Math.floor(base.printMaterialWeights[index])));
|
weights.push(String(Math.round(base.printMaterialWeights[index])));
|
||||||
var cost = base.printMaterialCosts[index] == undefined ? 0 : base.printMaterialCosts[index].toFixed(2);
|
var cost = base.printMaterialCosts[index] == undefined ? 0 : base.printMaterialCosts[index].toFixed(2);
|
||||||
costs.push(cost);
|
costs.push(cost);
|
||||||
if(cost > 0)
|
if(cost > 0)
|
||||||
|
@ -495,7 +495,7 @@ Rectangle
|
||||||
if(base.printMaterialLengths[index] > 0)
|
if(base.printMaterialLengths[index] > 0)
|
||||||
{
|
{
|
||||||
lengths.push(base.printMaterialLengths[index].toFixed(2));
|
lengths.push(base.printMaterialLengths[index].toFixed(2));
|
||||||
weights.push(String(Math.floor(base.printMaterialWeights[index])));
|
weights.push(String(Math.round(base.printMaterialWeights[index])));
|
||||||
var cost = base.printMaterialCosts[index] == undefined ? 0 : base.printMaterialCosts[index].toFixed(2);
|
var cost = base.printMaterialCosts[index] == undefined ? 0 : base.printMaterialCosts[index].toFixed(2);
|
||||||
costs.push(cost);
|
costs.push(cost);
|
||||||
if(cost > 0)
|
if(cost > 0)
|
||||||
|
@ -610,7 +610,7 @@ Rectangle
|
||||||
})
|
})
|
||||||
sidebarContents.replace(modesListModel.get(base.currentModeIndex).item, { "immediate": true })
|
sidebarContents.replace(modesListModel.get(base.currentModeIndex).item, { "immediate": true })
|
||||||
|
|
||||||
var index = Math.floor(UM.Preferences.getValue("cura/active_mode"))
|
var index = Math.round(UM.Preferences.getValue("cura/active_mode"))
|
||||||
if(index)
|
if(index)
|
||||||
{
|
{
|
||||||
currentModeIndex = index;
|
currentModeIndex = index;
|
||||||
|
|
|
@ -17,7 +17,7 @@ Column
|
||||||
property int currentExtruderIndex: Cura.ExtruderManager.activeExtruderIndex;
|
property int currentExtruderIndex: Cura.ExtruderManager.activeExtruderIndex;
|
||||||
property bool currentExtruderVisible: extrudersList.visible;
|
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 showTooltip(Item item, point location, string text)
|
||||||
signal hideTooltip()
|
signal hideTooltip()
|
||||||
|
@ -39,15 +39,15 @@ Column
|
||||||
{
|
{
|
||||||
id: extruderSelectionRow
|
id: extruderSelectionRow
|
||||||
width: parent.width
|
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
|
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
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
|
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
|
topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,15 +57,15 @@ Column
|
||||||
property var index: 0
|
property var index: 0
|
||||||
|
|
||||||
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
||||||
width: Math.floor(parent.width)
|
width: Math.round(parent.width)
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
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
|
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
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ Column
|
||||||
delegate: Button
|
delegate: Button
|
||||||
{
|
{
|
||||||
height: ListView.view.height
|
height: ListView.view.height
|
||||||
width: Math.floor(ListView.view.width / extrudersModel.rowCount())
|
width: Math.round(ListView.view.width / extrudersModel.rowCount())
|
||||||
|
|
||||||
text: model.name
|
text: model.name
|
||||||
tooltip: model.name
|
tooltip: model.name
|
||||||
|
@ -121,7 +121,7 @@ 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 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"
|
// 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 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 -= Math.floor(UM.Theme.getSize("default_margin").width / 2);
|
minimumSize -= Math.round(UM.Theme.getSize("default_margin").width / 2);
|
||||||
return minimumSize;
|
return minimumSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,15 +192,15 @@ Column
|
||||||
{
|
{
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
rightMargin: Math.floor(parent.sizeToUse * 0.01)
|
rightMargin: Math.round(parent.sizeToUse * 0.01)
|
||||||
topMargin: Math.floor(parent.sizeToUse * 0.05)
|
topMargin: Math.round(parent.sizeToUse * 0.05)
|
||||||
}
|
}
|
||||||
|
|
||||||
color: model.color
|
color: model.color
|
||||||
|
|
||||||
width: Math.floor(parent.width * 0.35)
|
width: Math.round(parent.width * 0.35)
|
||||||
height: Math.floor(parent.height * 0.35)
|
height: Math.round(parent.height * 0.35)
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: UM.Theme.getColor("extruder_button_material_border")
|
border.color: UM.Theme.getColor("extruder_button_material_border")
|
||||||
|
@ -219,7 +219,7 @@ Column
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: variantRowSpacer
|
id: variantRowSpacer
|
||||||
height: Math.floor(UM.Theme.getSize("sidebar_margin").height / 4)
|
height: Math.round(UM.Theme.getSize("sidebar_margin").height / 4)
|
||||||
width: height
|
width: height
|
||||||
visible: !extruderSelectionRow.visible
|
visible: !extruderSelectionRow.visible
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ Column
|
||||||
{
|
{
|
||||||
id: materialLabel
|
id: materialLabel
|
||||||
text: catalog.i18nc("@label","Material");
|
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");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ Column
|
||||||
visible: Cura.MachineManager.hasMaterials
|
visible: Cura.MachineManager.hasMaterials
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||||
height: UM.Theme.getSize("setting_control").height
|
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
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
@ -293,7 +293,7 @@ Column
|
||||||
{
|
{
|
||||||
id: variantLabel
|
id: variantLabel
|
||||||
text: Cura.MachineManager.activeDefinitionVariantsName;
|
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");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,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: 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
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
@ -318,7 +318,7 @@ Column
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: materialInfoRow
|
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
|
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
|
@ -332,7 +332,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: 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 {
|
UM.RecolorImage {
|
||||||
id: warningImage
|
id: warningImage
|
||||||
|
|
|
@ -146,16 +146,16 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateSliderStepWidth (totalTicks) {
|
function calculateSliderStepWidth (totalTicks) {
|
||||||
qualityModel.qualitySliderStepWidth = totalTicks != 0 ? Math.floor((base.width * 0.55) / (totalTicks)) : 0
|
qualityModel.qualitySliderStepWidth = totalTicks != 0 ? Math.round((base.width * 0.55) / (totalTicks)) : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateSliderMargins (availableMin, availableMax, totalTicks) {
|
function calculateSliderMargins (availableMin, availableMax, totalTicks) {
|
||||||
if (availableMin == -1 || (availableMin == 0 && availableMax == 0)) {
|
if (availableMin == -1 || (availableMin == 0 && availableMax == 0)) {
|
||||||
qualityModel.qualitySliderMarginRight = Math.floor(base.width * 0.55)
|
qualityModel.qualitySliderMarginRight = Math.round(base.width * 0.55)
|
||||||
} else if (availableMin == availableMax) {
|
} else if (availableMin == availableMax) {
|
||||||
qualityModel.qualitySliderMarginRight = Math.floor((totalTicks - availableMin) * qualitySliderStepWidth)
|
qualityModel.qualitySliderMarginRight = Math.round((totalTicks - availableMin) * qualitySliderStepWidth)
|
||||||
} else {
|
} else {
|
||||||
qualityModel.qualitySliderMarginRight = Math.floor((totalTicks - availableMax) * qualitySliderStepWidth)
|
qualityModel.qualitySliderMarginRight = Math.round((totalTicks - availableMax) * qualitySliderStepWidth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ Item
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2)
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||||
color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
|
@ -219,13 +219,13 @@ Item
|
||||||
// Make sure the text aligns correctly with each tick
|
// Make sure the text aligns correctly with each tick
|
||||||
if (qualityModel.totalTicks == 0) {
|
if (qualityModel.totalTicks == 0) {
|
||||||
// If there is only one tick, align it centrally
|
// If there is only one tick, align it centrally
|
||||||
return Math.floor(((base.width * 0.55) - width) / 2)
|
return Math.round(((base.width * 0.55) - width) / 2)
|
||||||
} else if (index == 0) {
|
} else if (index == 0) {
|
||||||
return Math.floor(base.width * 0.55 / qualityModel.totalTicks) * index
|
return Math.round(base.width * 0.55 / qualityModel.totalTicks) * index
|
||||||
} else if (index == qualityModel.totalTicks) {
|
} else if (index == qualityModel.totalTicks) {
|
||||||
return Math.floor(base.width * 0.55 / qualityModel.totalTicks) * index - width
|
return Math.round(base.width * 0.55 / qualityModel.totalTicks) * index - width
|
||||||
} else {
|
} else {
|
||||||
return Math.floor((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2))
|
return Math.round((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ Item
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: speedSlider
|
id: speedSlider
|
||||||
width: Math.floor(base.width * 0.55)
|
width: Math.round(base.width * 0.55)
|
||||||
height: UM.Theme.getSize("sidebar_margin").height
|
height: UM.Theme.getSize("sidebar_margin").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
@ -246,7 +246,7 @@ Item
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: groovechildrect
|
id: groovechildrect
|
||||||
width: Math.floor(base.width * 0.55)
|
width: Math.round(base.width * 0.55)
|
||||||
height: 2 * screenScaleFactor
|
height: 2 * screenScaleFactor
|
||||||
color: UM.Theme.getColor("quality_slider_unavailable")
|
color: UM.Theme.getColor("quality_slider_unavailable")
|
||||||
anchors.verticalCenter: qualitySlider.verticalCenter
|
anchors.verticalCenter: qualitySlider.verticalCenter
|
||||||
|
@ -266,7 +266,7 @@ Item
|
||||||
width: 1 * screenScaleFactor
|
width: 1 * screenScaleFactor
|
||||||
height: 6 * screenScaleFactor
|
height: 6 * screenScaleFactor
|
||||||
y: 0
|
y: 0
|
||||||
x: Math.floor(qualityModel.qualitySliderStepWidth * index)
|
x: Math.round(qualityModel.qualitySliderStepWidth * index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ Item
|
||||||
color: UM.Theme.getColor("quality_slider_unavailable")
|
color: UM.Theme.getColor("quality_slider_unavailable")
|
||||||
implicitWidth: 10 * screenScaleFactor
|
implicitWidth: 10 * screenScaleFactor
|
||||||
implicitHeight: implicitWidth
|
implicitHeight: implicitWidth
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider
|
Slider
|
||||||
|
@ -306,7 +306,7 @@ Item
|
||||||
groove: Rectangle {
|
groove: Rectangle {
|
||||||
implicitHeight: 2 * screenScaleFactor
|
implicitHeight: 2 * screenScaleFactor
|
||||||
color: UM.Theme.getColor("quality_slider_available")
|
color: UM.Theme.getColor("quality_slider_available")
|
||||||
radius: Math.floor(height / 2)
|
radius: Math.round(height / 2)
|
||||||
}
|
}
|
||||||
handle: Item {
|
handle: Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -315,7 +315,7 @@ Item
|
||||||
color: UM.Theme.getColor("quality_slider_available")
|
color: UM.Theme.getColor("quality_slider_available")
|
||||||
implicitWidth: 10 * screenScaleFactor
|
implicitWidth: 10 * screenScaleFactor
|
||||||
implicitHeight: implicitWidth
|
implicitHeight: implicitWidth
|
||||||
radius: Math.floor(implicitWidth / 2)
|
radius: Math.round(implicitWidth / 2)
|
||||||
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile
|
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -362,7 +362,7 @@ Item
|
||||||
text: catalog.i18nc("@label", "Print Speed")
|
text: catalog.i18nc("@label", "Print Speed")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
width: Math.floor(UM.Theme.getSize("sidebar").width * 0.35)
|
width: Math.round(UM.Theme.getSize("sidebar").width * 0.35)
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,12 +393,12 @@ Item
|
||||||
id: customisedSettings
|
id: customisedSettings
|
||||||
|
|
||||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
|
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||||
height: Math.floor(speedSlider.height * 0.8)
|
height: Math.round(speedSlider.height * 0.8)
|
||||||
width: Math.floor(speedSlider.height * 0.8)
|
width: Math.round(speedSlider.height * 0.8)
|
||||||
|
|
||||||
anchors.verticalCenter: speedSlider.verticalCenter
|
anchors.verticalCenter: speedSlider.verticalCenter
|
||||||
anchors.right: speedSlider.left
|
anchors.right: speedSlider.left
|
||||||
anchors.rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2)
|
anchors.rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width / 2)
|
||||||
|
|
||||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||||
iconSource: UM.Theme.getIcon("reset");
|
iconSource: UM.Theme.getIcon("reset");
|
||||||
|
@ -438,7 +438,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: Math.floor(UM.Theme.getSize("sidebar").width * .45) - UM.Theme.getSize("sidebar_margin").width
|
width: Math.round(UM.Theme.getSize("sidebar").width * .45) - UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
@ -448,7 +448,7 @@ Item
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.7)
|
anchors.topMargin: Math.round(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
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,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: Math.floor(UM.Theme.getSize("sidebar").width * .55)
|
width: Math.round(UM.Theme.getSize("sidebar").width * .55)
|
||||||
|
|
||||||
anchors.left: infillCellLeft.right
|
anchors.left: infillCellLeft.right
|
||||||
anchors.top: infillCellLeft.top
|
anchors.top: infillCellLeft.top
|
||||||
|
@ -470,7 +470,7 @@ Item
|
||||||
|
|
||||||
//anchors.top: parent.top
|
//anchors.top: parent.top
|
||||||
anchors.left: infillSlider.left
|
anchors.left: infillSlider.left
|
||||||
anchors.leftMargin: Math.floor((infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor)
|
anchors.leftMargin: Math.round((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) + "%"
|
||||||
|
@ -576,12 +576,12 @@ Item
|
||||||
{
|
{
|
||||||
id: infillIcon
|
id: infillIcon
|
||||||
|
|
||||||
width: Math.floor((parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width))
|
width: Math.round((parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width))
|
||||||
height: width
|
height: width
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2)
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||||
|
|
||||||
// we loop over all density icons and only show the one that has the current density and steps
|
// we loop over all density icons and only show the one that has the current density and steps
|
||||||
Repeater
|
Repeater
|
||||||
|
@ -592,8 +592,8 @@ Item
|
||||||
|
|
||||||
function activeIndex () {
|
function activeIndex () {
|
||||||
for (var i = 0; i < infillModel.count; i++) {
|
for (var i = 0; i < infillModel.count; i++) {
|
||||||
var density = Math.floor(infillDensity.properties.value)
|
var density = Math.round(infillDensity.properties.value)
|
||||||
var steps = Math.floor(infillSteps.properties.value)
|
var steps = Math.round(infillSteps.properties.value)
|
||||||
var infillModelItem = infillModel.get(i)
|
var infillModelItem = infillModel.get(i)
|
||||||
|
|
||||||
if (infillModelItem != "undefined"
|
if (infillModelItem != "undefined"
|
||||||
|
@ -634,7 +634,7 @@ Item
|
||||||
property alias _hovered: enableGradualInfillMouseArea.containsMouse
|
property alias _hovered: enableGradualInfillMouseArea.containsMouse
|
||||||
|
|
||||||
anchors.top: infillSlider.bottom
|
anchors.top: infillSlider.bottom
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category
|
||||||
anchors.left: infillCellRight.left
|
anchors.left: infillCellRight.left
|
||||||
|
|
||||||
style: UM.Theme.styles.checkbox
|
style: UM.Theme.styles.checkbox
|
||||||
|
@ -676,7 +676,7 @@ Item
|
||||||
Label {
|
Label {
|
||||||
id: gradualInfillLabel
|
id: gradualInfillLabel
|
||||||
anchors.left: enableGradualInfillCheckBox.right
|
anchors.left: enableGradualInfillCheckBox.right
|
||||||
anchors.leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2)
|
anchors.leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width / 2)
|
||||||
text: catalog.i18nc("@label", "Enable gradual")
|
text: catalog.i18nc("@label", "Enable gradual")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
@ -737,7 +737,7 @@ Item
|
||||||
visible: enableSupportCheckBox.visible
|
visible: enableSupportCheckBox.visible
|
||||||
|
|
||||||
anchors.top: infillCellRight.bottom
|
anchors.top: infillCellRight.bottom
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.5)
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height * 1.5)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.right: infillCellLeft.right
|
anchors.right: infillCellLeft.right
|
||||||
|
@ -823,7 +823,7 @@ Item
|
||||||
anchors.topMargin: ((supportEnabled.properties.value === "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("sidebar_margin").height : 0
|
anchors.topMargin: ((supportEnabled.properties.value === "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("sidebar_margin").height : 0
|
||||||
anchors.left: infillCellRight.left
|
anchors.left: infillCellRight.left
|
||||||
|
|
||||||
width: Math.floor(UM.Theme.getSize("sidebar").width * .55)
|
width: Math.round(UM.Theme.getSize("sidebar").width * .55)
|
||||||
height: ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("setting_control").height : 0
|
height: ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("setting_control").height : 0
|
||||||
|
|
||||||
Behavior on height { NumberAnimation { duration: 100 } }
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
|
@ -952,7 +952,7 @@ Item
|
||||||
{
|
{
|
||||||
id: tipsCell
|
id: tipsCell
|
||||||
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
|
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
|
||||||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2)
|
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height * 2)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: tipsText.contentHeight * tipsText.lineCount
|
height: tipsText.contentHeight * tipsText.lineCount
|
||||||
|
|
|
@ -36,7 +36,7 @@ UM.PointingRectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
base.opacity = 1;
|
base.opacity = 1;
|
||||||
target = Qt.point(40 , position.y + Math.floor(UM.Theme.getSize("tooltip_arrow_margins").height / 2))
|
target = Qt.point(40 , position.y + Math.round(UM.Theme.getSize("tooltip_arrow_margins").height / 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
|
|
@ -91,7 +91,7 @@ Item
|
||||||
anchors.topMargin: base.activeY
|
anchors.topMargin: base.activeY
|
||||||
z: buttons.z -1
|
z: buttons.z -1
|
||||||
|
|
||||||
target: Qt.point(parent.right, base.activeY + Math.floor(UM.Theme.getSize("button").height/2))
|
target: Qt.point(parent.right, base.activeY + Math.round(UM.Theme.getSize("button").height/2))
|
||||||
arrowSize: UM.Theme.getSize("default_arrow").width
|
arrowSize: UM.Theme.getSize("default_arrow").width
|
||||||
|
|
||||||
width:
|
width:
|
||||||
|
|
|
@ -219,7 +219,7 @@ Rectangle
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.right: viewModeButton.right
|
anchors.right: viewModeButton.right
|
||||||
|
|
||||||
property var buttonTarget: Qt.point(viewModeButton.x + Math.floor(viewModeButton.width / 2), viewModeButton.y + Math.floor(viewModeButton.height / 2))
|
property var buttonTarget: Qt.point(viewModeButton.x + Math.round(viewModeButton.width / 2), viewModeButton.y + Math.round(viewModeButton.height / 2))
|
||||||
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
|
|
|
@ -121,13 +121,13 @@ QtObject {
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Math.floor(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2)
|
width: Math.round(textLabel.width + icon.width + Theme.getSize("default_margin").width / 2)
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: textLabel
|
id: textLabel
|
||||||
text: control.text
|
text: control.text
|
||||||
anchors.right: icon.visible ? icon.left : parent.right
|
anchors.right: icon.visible ? icon.left : parent.right
|
||||||
anchors.rightMargin: icon.visible ? Math.floor(Theme.getSize("default_margin").width / 2) : 0
|
anchors.rightMargin: icon.visible ? Math.round(Theme.getSize("default_margin").width / 2) : 0
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
|
font: control.checked ? UM.Theme.getFont("large") : UM.Theme.getFont("large_nonbold")
|
||||||
color:
|
color:
|
||||||
|
@ -268,7 +268,7 @@ QtObject {
|
||||||
anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2
|
anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
target: Qt.point(parent.x, y + Math.floor(height/2))
|
target: Qt.point(parent.x, y + Math.round(height/2))
|
||||||
arrowSize: Theme.getSize("button_tooltip_arrow").width
|
arrowSize: Theme.getSize("button_tooltip_arrow").width
|
||||||
color: Theme.getColor("button_tooltip")
|
color: Theme.getColor("button_tooltip")
|
||||||
opacity: control.hovered ? 1.0 : 0.0;
|
opacity: control.hovered ? 1.0 : 0.0;
|
||||||
|
@ -329,9 +329,9 @@ QtObject {
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
id: tool_button_arrow
|
id: tool_button_arrow
|
||||||
anchors.right: parent.right;
|
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.round(Theme.getSize("button_icon").width / 4)
|
||||||
anchors.bottom: parent.bottom;
|
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.round(Theme.getSize("button_icon").height / 4)
|
||||||
width: Theme.getSize("standard_arrow").width
|
width: Theme.getSize("standard_arrow").width
|
||||||
height: Theme.getSize("standard_arrow").height
|
height: Theme.getSize("standard_arrow").height
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
|
@ -669,7 +669,7 @@ QtObject {
|
||||||
id: category_arrow
|
id: category_arrow
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Theme.getSize("default_margin").width * 3 - Math.floor(width / 2)
|
anchors.rightMargin: Theme.getSize("default_margin").width * 3 - Math.round(width / 2)
|
||||||
width: Theme.getSize("standard_arrow").width
|
width: Theme.getSize("standard_arrow").width
|
||||||
height: Theme.getSize("standard_arrow").height
|
height: Theme.getSize("standard_arrow").height
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
|
@ -712,14 +712,14 @@ QtObject {
|
||||||
|
|
||||||
scrollBarBackground: Rectangle {
|
scrollBarBackground: Rectangle {
|
||||||
implicitWidth: Theme.getSize("scrollbar").width
|
implicitWidth: Theme.getSize("scrollbar").width
|
||||||
radius: Math.floor(implicitWidth / 2)
|
radius: Math.round(implicitWidth / 2)
|
||||||
color: Theme.getColor("scrollbar_background");
|
color: Theme.getColor("scrollbar_background");
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
id: scrollViewHandle
|
id: scrollViewHandle
|
||||||
implicitWidth: Theme.getSize("scrollbar").width;
|
implicitWidth: Theme.getSize("scrollbar").width;
|
||||||
radius: Math.floor(implicitWidth / 2)
|
radius: Math.round(implicitWidth / 2)
|
||||||
|
|
||||||
color: styleData.pressed ? Theme.getColor("scrollbar_handle_down") : styleData.hovered ? Theme.getColor("scrollbar_handle_hover") : Theme.getColor("scrollbar_handle");
|
color: styleData.pressed ? Theme.getColor("scrollbar_handle_down") : styleData.hovered ? Theme.getColor("scrollbar_handle_hover") : Theme.getColor("scrollbar_handle");
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
@ -806,12 +806,12 @@ QtObject {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: swatch
|
id: swatch
|
||||||
height: Math.floor(UM.Theme.getSize("setting_control").height / 2)
|
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||||
width: height
|
width: height
|
||||||
anchors.right: downArrow.left
|
anchors.right: downArrow.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: Math.floor(UM.Theme.getSize("default_margin").width / 4)
|
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||||
radius: Math.floor(width / 2)
|
radius: Math.round(width / 2)
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
color: (control.color_override !== "") ? control.color_override : control.color
|
color: (control.color_override !== "") ? control.color_override : control.color
|
||||||
|
@ -845,7 +845,7 @@ QtObject {
|
||||||
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
|
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0
|
radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
|
||||||
|
|
||||||
border.width: Theme.getSize("default_lining").width;
|
border.width: Theme.getSize("default_lining").width;
|
||||||
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
|
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
|
||||||
|
@ -853,8 +853,8 @@ QtObject {
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(parent.width / 2.5)
|
width: Math.round(parent.width / 2.5)
|
||||||
height: Math.floor(parent.height / 2.5)
|
height: Math.round(parent.height / 2.5)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: Theme.getColor("checkbox_mark")
|
color: Theme.getColor("checkbox_mark")
|
||||||
|
@ -882,7 +882,7 @@ QtObject {
|
||||||
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
|
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
radius: control.exclusiveGroup ? Math.floor(Theme.getSize("checkbox").width / 2) : 0
|
radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
|
||||||
|
|
||||||
border.width: Theme.getSize("default_lining").width;
|
border.width: Theme.getSize("default_lining").width;
|
||||||
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
|
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
|
||||||
|
@ -890,8 +890,8 @@ QtObject {
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: Math.floor(parent.width / 2.5)
|
width: Math.round(parent.width / 2.5)
|
||||||
height: Math.floor(parent.height / 2.5)
|
height: Math.round(parent.height / 2.5)
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
color: Theme.getColor("checkbox_mark")
|
color: Theme.getColor("checkbox_mark")
|
||||||
|
@ -925,7 +925,7 @@ QtObject {
|
||||||
border.width: Theme.getSize("default_lining").width;
|
border.width: Theme.getSize("default_lining").width;
|
||||||
border.color: Theme.getColor("slider_groove_border");
|
border.color: Theme.getColor("slider_groove_border");
|
||||||
|
|
||||||
radius: Math.floor(width / 2);
|
radius: Math.round(width / 2);
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -934,8 +934,8 @@ QtObject {
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
}
|
}
|
||||||
color: Theme.getColor("slider_groove_fill");
|
color: Theme.getColor("slider_groove_fill");
|
||||||
width: Math.floor((control.value / (control.maximumValue - control.minimumValue)) * parent.width);
|
width: Math.round((control.value / (control.maximumValue - control.minimumValue)) * parent.width);
|
||||||
radius: Math.floor(width / 2);
|
radius: Math.round(width / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
|
@ -944,7 +944,7 @@ QtObject {
|
||||||
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
|
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
|
||||||
border.width: Theme.getSize("default_lining").width
|
border.width: Theme.getSize("default_lining").width
|
||||||
border.color: control.hovered ? Theme.getColor("slider_handle_hover_border") : Theme.getColor("slider_handle_border")
|
border.color: control.hovered ? Theme.getColor("slider_handle_hover_border") : Theme.getColor("slider_handle_border")
|
||||||
radius: Math.floor(Theme.getSize("slider_handle").width / 2); //Round.
|
radius: Math.round(Theme.getSize("slider_handle").width / 2); //Round.
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue