Make the width of the PreviewMenu headers dynamic

CURA-8011
This commit is contained in:
Konstantinos Karmas 2021-07-05 10:37:19 +02:00
parent 9c49baa9ce
commit 1a273714a3
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ Item
{
id: viewsSelector
height: parent.height
width: UM.Theme.getSize("views_selector").width
width: Math.max(Math.round((parent.width - printSetupSelectorItem.width) / 3), UM.Theme.getSize("views_selector").width)
headerCornerSide: Cura.RoundedRectangle.Direction.Left
}
@ -52,7 +52,7 @@ Item
{
id: viewPanel
height: parent.height
width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width - 2 * (UM.Theme.getSize("wide_margin").width + UM.Theme.getSize("default_lining").width)) : 0
width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width) : 0
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
}

View file

@ -504,7 +504,7 @@
"machine_selector_widget_content": [25.0, 32.0],
"machine_selector_icon": [2.5, 2.5],
"views_selector": [23.0, 4.0],
"views_selector": [16.0, 4.0],
"printer_type_label": [3.5, 1.5],