Make the machineSelection header adjust its width

Whenever the window gets resized, the machineSelector header will now change it size, similar to the configurationSelector next to it.

CURA-8013
This commit is contained in:
Konstantinos Karmas 2021-06-28 14:48:54 +02:00
parent 7ff86547ef
commit bbfa93c9a7

View File

@ -50,8 +50,7 @@ Item
{ {
id: machineSelection id: machineSelection
headerCornerSide: Cura.RoundedRectangle.Direction.Left headerCornerSide: Cura.RoundedRectangle.Direction.Left
Layout.minimumWidth: UM.Theme.getSize("machine_selector_widget").width Layout.preferredWidth: Math.round((itemRow.width - printSetupSelectorItem.width - UM.Theme.getSize("default_lining").width) * 1 / 3 - UM.Theme.getSize("default_lining").width)
Layout.maximumWidth: UM.Theme.getSize("machine_selector_widget").width
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
} }
@ -69,7 +68,7 @@ Item
id: printerSetup id: printerSetup
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredWidth: itemRow.width - machineSelection.width - printSetupSelectorItem.width - 2 * UM.Theme.getSize("default_lining").width Layout.preferredWidth: Math.round((itemRow.width - printSetupSelectorItem.width - UM.Theme.getSize("default_lining").width) * 2 / 3 - UM.Theme.getSize("default_lining").width)
} }
// Separator line // Separator line