Fix to make sure margins cant have partial values

CURA-4941
This commit is contained in:
Mark 2018-02-13 07:31:02 +01:00
parent d0fdf85eb1
commit 7ea654df3d
3 changed files with 18 additions and 18 deletions

View file

@ -26,7 +26,7 @@ SettingItem
anchors.fill: parent
border.width: UM.Theme.getSize("default_lining").width
border.width: Math.floor(UM.Theme.getSize("default_lining").width)
border.color:
{
if(!enabled)
@ -76,7 +76,7 @@ SettingItem
Rectangle
{
anchors.fill: parent;
anchors.margins: UM.Theme.getSize("default_lining").width;
anchors.margins: Math.floor(UM.Theme.getSize("default_lining").width);
color: UM.Theme.getColor("setting_control_highlight")
opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35;
}
@ -84,7 +84,7 @@ SettingItem
Label
{
anchors.right: parent.right;
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
anchors.rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
anchors.verticalCenter: parent.verticalCenter;
text: definition.unit;
@ -107,9 +107,9 @@ SettingItem
anchors
{
left: parent.left
leftMargin: UM.Theme.getSize("setting_unit_margin").width
leftMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
right: parent.right
rightMargin: UM.Theme.getSize("setting_unit_margin").width
rightMargin: Math.floor(UM.Theme.getSize("setting_unit_margin").width)
verticalCenter: parent.verticalCenter
}
renderType: Text.NativeRendering