From 29e152582fbc9f039eb586543147cd71ad732f4e Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 22 Jun 2017 14:30:26 +0200 Subject: [PATCH] Make layerview panel hug the bottom of small windows Fixes https://github.com/Ultimaker/Cura/issues/2013 --- resources/qml/Cura.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 3addb72bed..d4a6a90b6b 100755 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -306,9 +306,12 @@ UM.MainWindow { id: view_panel - anchors.top: viewModeButton.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height; + property bool hugBottom: parent.height < viewModeButton.y + viewModeButton.height + height + UM.Theme.getSize("default_margin").height + + anchors.bottom: parent.bottom + anchors.bottomMargin: hugBottom ? 0 : parent.height - (viewModeButton.y + viewModeButton.height + height + UM.Theme.getSize("default_margin").height) anchors.left: viewModeButton.left; + anchors.leftMargin: hugBottom ? viewModeButton.width + UM.Theme.getSize("default_margin").width : 0 height: childrenRect.height;