Fix layout

Dialog is now more robust against being too small
This commit is contained in:
fieldOfView 2017-07-11 17:21:17 +02:00
parent 219d1938c2
commit d00bb2524e

View file

@ -41,7 +41,7 @@ Cura.MachineAction
anchors.fill: parent; anchors.fill: parent;
Item Item
{ {
id: bedLevelMachineAction id: machineSettingsAction
anchors.fill: parent; anchors.fill: parent;
UM.I18nCatalog { id: catalog; name: "cura"; } UM.I18nCatalog { id: catalog; name: "cura"; }
@ -233,7 +233,6 @@ Cura.MachineAction
UM.TooltipArea UM.TooltipArea
{ {
id: extruderCountControl
visible: manager.definedExtruderCount > 1 visible: manager.definedExtruderCount > 1
height: childrenRect.height height: childrenRect.height
width: childrenRect.width width: childrenRect.width
@ -246,6 +245,8 @@ Cura.MachineAction
Label Label
{ {
text: catalog.i18nc("@label", "Number of Extruders") text: catalog.i18nc("@label", "Number of Extruders")
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - extruderCountComboBox.width)
anchors.verticalCenter: extruderCountComboBox.verticalCenter anchors.verticalCenter: extruderCountComboBox.verticalCenter
} }
ComboBox ComboBox
@ -553,6 +554,8 @@ Cura.MachineAction
{ {
text: _label text: _label
visible: _label != "" visible: _label != ""
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - textFieldWithUnit.width)
anchors.verticalCenter: textFieldWithUnit.verticalCenter anchors.verticalCenter: textFieldWithUnit.verticalCenter
} }
@ -644,7 +647,9 @@ Cura.MachineAction
{ {
text: _label text: _label
visible: _label != "" visible: _label != ""
anchors.verticalCenter: textFieldWithUnit.verticalCenter elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - comboBox.width)
anchors.verticalCenter: comboBox.verticalCenter
} }
ComboBox ComboBox
{ {
@ -774,11 +779,14 @@ Cura.MachineAction
{ {
text: _label text: _label
visible: _label != "" visible: _label != ""
elide: Text.ElideRight
width: Math.max(0, settingsTabs.columnWidth - 2 * UM.Theme.getSize("default_margin").width - textFieldWithUnit.width)
anchors.verticalCenter: textFieldWithUnit.verticalCenter anchors.verticalCenter: textFieldWithUnit.verticalCenter
} }
Item Item
{ {
id: textFieldWithUnit
width: textField.width width: textField.width
height: textField.height height: textField.height