mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Found some more margins that wouldnt be fixed numbers and made the code more consistent
This commit is contained in:
parent
6c04a8be5d
commit
334283e893
8 changed files with 24 additions and 27 deletions
|
|
@ -17,10 +17,10 @@ Component
|
|||
}
|
||||
return (sourceSize.width / sourceSize.height) > (maximumWidth / maximumHeight);
|
||||
}
|
||||
property real _width: Math.min(maximumWidth, sourceSize.width)
|
||||
property real _height: Math.min(maximumHeight, sourceSize.height)
|
||||
width: proportionalHeight ? _width : sourceSize.width * _height / sourceSize.height
|
||||
height: !proportionalHeight ? _height : sourceSize.height * _width / sourceSize.width
|
||||
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)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
onVisibleChanged:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue