Fix adjustable monitor component width

CURA-5943

 - Add rounding
 - If there's no sidebar, use full width
This commit is contained in:
Lipu Fei 2018-11-26 13:08:30 +01:00
parent 1c4f7c7fb7
commit 845b320981

View File

@ -38,7 +38,10 @@ Item
anchors.bottom: parent.bottom
anchors.left: parent.left
width: parent.width * 0.7
// If the sidebar is not set, the view should take the complete space.
property var widthFactor: monitorSidebarComponent.source == "" ? 1.0 : 0.7
width: Math.round(parent.width * widthFactor)
height: parent.height
property real maximumWidth: parent.width