Browse Source

Moved conflict boxes to be aligned with "headers"

CURA-1263
Jaime van Kessel 8 years ago
parent
commit
c25c4c1d77
1 changed files with 87 additions and 68 deletions
  1. 87 68
      plugins/3MFReader/WorkspaceDialog.qml

+ 87 - 68
plugins/3MFReader/WorkspaceDialog.qml

@@ -85,10 +85,41 @@ UM.Dialog
                 width: height
             }
 
-            Label
+            Row
             {
-                text: catalog.i18nc("@action:label", "Printer settings")
-                font.bold: true
+                height: childrenRect.height
+                width: parent.width
+                Label
+                {
+                    text: catalog.i18nc("@action:label", "Printer settings")
+                    font.bold: true
+                    width: parent.width /3
+                }
+                Item
+                {
+                    // spacer
+                    height: spacerHeight
+                    width: parent.width / 3
+                }
+                UM.TooltipArea
+                {
+                    id: machineResolveTooltip
+                    width: parent.width / 3
+                    height: visible ? comboboxHeight : 0
+                    visible: manager.machineConflict
+                    text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?")
+                    ComboBox
+                    {
+                        model: resolveStrategiesModel
+                        textRole: "label"
+                        id: machineResolveComboBox
+                        width: parent.width
+                        onActivated:
+                        {
+                            manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key)
+                        }
+                    }
+                }
             }
             Row
             {
@@ -120,26 +151,6 @@ UM.Dialog
                     text: manager.machineName
                     width: parent.width / 3
                 }
-
-                UM.TooltipArea
-                {
-                    id: machineResolveTooltip
-                    width: parent.width / 3
-                    height: visible ? comboboxHeight : 0
-                    visible: manager.machineConflict
-                    text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?")
-                    ComboBox
-                    {
-                        model: resolveStrategiesModel
-                        textRole: "label"
-                        id: machineResolveComboBox
-                        width: parent.width
-                        onActivated:
-                        {
-                            manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key)
-                        }
-                    }
-                }
             }
 
             Item // Spacer
@@ -147,28 +158,22 @@ UM.Dialog
                 height: spacerHeight
                 width: height
             }
-
-            Label
-            {
-                text: catalog.i18nc("@action:label", "Profile settings")
-                font.bold: true
-            }
-
             Row
             {
-                width: parent.width
                 height: childrenRect.height
+                width: parent.width
                 Label
                 {
-                    text: catalog.i18nc("@action:label", "Name")
+                    text: catalog.i18nc("@action:label", "Profile settings")
+                    font.bold: true
                     width: parent.width / 3
                 }
-                Label
+                Item
                 {
-                    text: manager.qualityName
+                    // spacer
+                    height: spacerHeight
                     width: parent.width / 3
                 }
-
                 UM.TooltipArea
                 {
                     id: qualityChangesResolveTooltip
@@ -190,6 +195,21 @@ UM.Dialog
                 }
             }
             Row
+            {
+                width: parent.width
+                height: childrenRect.height
+                Label
+                {
+                    text: catalog.i18nc("@action:label", "Name")
+                    width: parent.width / 3
+                }
+                Label
+                {
+                    text: manager.qualityName
+                    width: parent.width / 3
+                }
+            }
+            Row
             {
                 width: parent.width
                 height: manager.numUserSettings != 0 ? childrenRect.height : 0
@@ -226,50 +246,28 @@ UM.Dialog
                 height: spacerHeight
                 width: height
             }
-
-            Label
-            {
-                text: catalog.i18nc("@action:label", "Material settings")
-                font.bold: true
-            }
-
-            Repeater
-            {
-                model: manager.materialLabels
-                delegate: Row
-                {
-                    width: parent.width
-                    height: childrenRect.height
-                    Label
-                    {
-                        text: catalog.i18nc("@action:label", "Name")
-                        width: parent.width / 3
-                    }
-                    Label
-                    {
-                        text: modelData
-                        width: parent.width / 3
-                    }
-                }
-            }
-
             Row
             {
-                width: parent.width
                 height: childrenRect.height
-                visible: manager.materialConflict
+                width: parent.width
+                Label
+                {
+                    text: catalog.i18nc("@action:label", "Material settings")
+                    font.bold: true
+                    width: parent.width / 3
+                }
                 Item
                 {
-                    width: parent.width / 3 * 2
-                    height: comboboxHeight
+                    // spacer
+                    height: spacerHeight
+                    width: parent.width / 3
                 }
-
                 UM.TooltipArea
                 {
                     id: materialResolveTooltip
                     width: parent.width / 3
                     height: visible ? comboboxHeight : 0
-
+                    visible: manager.materialConflict
                     text: catalog.i18nc("@info:tooltip", "How should the conflict in the material be resolved?")
                     ComboBox
                     {
@@ -284,6 +282,27 @@ UM.Dialog
                     }
                 }
             }
+
+            Repeater
+            {
+                model: manager.materialLabels
+                delegate: Row
+                {
+                    width: parent.width
+                    height: childrenRect.height
+                    Label
+                    {
+                        text: catalog.i18nc("@action:label", "Name")
+                        width: parent.width / 3
+                    }
+                    Label
+                    {
+                        text: modelData
+                        width: parent.width / 3
+                    }
+                }
+            }
+
             Item // Spacer
             {
                 height: spacerHeight