Browse Source

Hide one spacer if there is no viewPanel

CURA-5785
Jaime van Kessel 6 years ago
parent
commit
9aa5b6fe3f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      plugins/PreviewStage/PreviewMenu.qml

+ 4 - 1
plugins/PreviewStage/PreviewMenu.qml

@@ -106,7 +106,10 @@ Item
             Rectangle
             Rectangle
             {
             {
                 height: parent.height
                 height: parent.height
-                width: UM.Theme.getSize("default_lining").width
+                // If there is no viewPanel, we only need a single spacer, so hide this one.
+                visible: viewPanel.source != ""
+                width: visible ? UM.Theme.getSize("default_lining").width : 0
+
                 color: UM.Theme.getColor("lining")
                 color: UM.Theme.getColor("lining")
             }
             }