Change Math.floor to Math.round as a last try to fix garbled fonts

CURA-4941
This commit is contained in:
Mark 2018-02-14 09:28:47 +01:00
parent a792fc59eb
commit b531c0550d
36 changed files with 213 additions and 213 deletions

View file

@ -17,10 +17,10 @@ Component
}
return (sourceSize.width / sourceSize.height) > (maximumWidth / maximumHeight);
}
property real _width: Math.floor(Math.min(maximumWidth, sourceSize.width))
property real _height: Math.floor(Math.min(maximumHeight, sourceSize.height))
width: proportionalHeight ? _width : Math.floor(sourceSize.width * _height / sourceSize.height)
height: !proportionalHeight ? _height : Math.floor(sourceSize.height * _width / sourceSize.width)
property real _width: Math.round(Math.min(maximumWidth, sourceSize.width))
property real _height: Math.round(Math.min(maximumHeight, sourceSize.height))
width: proportionalHeight ? _width : Math.round(sourceSize.width * _height / sourceSize.height)
height: !proportionalHeight ? _height : Math.round(sourceSize.height * _width / sourceSize.width)
anchors.horizontalCenter: parent.horizontalCenter
onVisibleChanged: