Make PrintSetupSelector use layout instead of fixed width

This makes the components autoscale a bit when needed.

CURA-5785
This commit is contained in:
Jaime van Kessel 2018-11-12 13:29:21 +01:00
parent ca63733827
commit 54685c983a
2 changed files with 20 additions and 17 deletions

View file

@ -18,8 +18,8 @@ Cura.ExpandableComponent
property int currentModeIndex: -1
property bool hideSettings: PrintInformation.preSliced
property string enabledText: catalog.i18nc("@label", "On")
property string disabledText: catalog.i18nc("@label", "Off")
property string enabledText: catalog.i18nc("@label:Should be short", "On")
property string disabledText: catalog.i18nc("@label:Should be short", "Off")
// This widget doesn't show tooltips by itself. Instead it emits signals so others can do something with it.
signal showTooltip(Item item, point location, string text)
@ -44,7 +44,7 @@ Cura.ExpandableComponent
onCurrentModeIndexChanged: UM.Preferences.setValue("cura/active_mode", currentModeIndex)
headerItem: Row
headerItem: RowLayout
{
anchors.fill: parent
@ -52,8 +52,6 @@ Cura.ExpandableComponent
{
source: UM.Theme.getIcon("category_layer_height")
text: Cura.MachineManager.activeQualityOrQualityChangesName + " " + layerHeight.properties.value + "mm"
width: parent.width / 4
height: parent.height
UM.SettingPropertyProvider
{
@ -68,8 +66,6 @@ Cura.ExpandableComponent
{
source: UM.Theme.getIcon("category_infill")
text: parseInt(infillDensity.properties.value) + "%"
width: parent.width / 4
height: parent.height
UM.SettingPropertyProvider
{
@ -84,8 +80,7 @@ Cura.ExpandableComponent
{
source: UM.Theme.getIcon("category_support")
text: supportEnabled.properties.value == "True" ? enabledText : disabledText
width: parent.width / 4
height: parent.height
UM.SettingPropertyProvider
{
@ -100,8 +95,6 @@ Cura.ExpandableComponent
{
source: UM.Theme.getIcon("category_adhesion")
text: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" ? enabledText : disabledText
width: parent.width / 4
height: parent.height
UM.SettingPropertyProvider
{