From 5c54cb740aec8038652b7fc8aaca3b3788874048 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 5 Feb 2019 13:24:28 +0100 Subject: [PATCH 1/4] Fix dark-theme material-estimates-panel (and layout-issues). [CURA-6174] --- resources/qml/ActionPanel/PrintJobInformation.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/qml/ActionPanel/PrintJobInformation.qml b/resources/qml/ActionPanel/PrintJobInformation.qml index 7cd466c33f..4b8461987b 100644 --- a/resources/qml/ActionPanel/PrintJobInformation.qml +++ b/resources/qml/ActionPanel/PrintJobInformation.qml @@ -39,8 +39,8 @@ Column id: byLineType property var printDuration: PrintInformation.currentPrintTime - property var columnWidthMultipliers: [ 0.4, 0.3, 0.3 ] - property var columnHorizontalAligns: [ TextInput.AlignLeft, TextInput.AlignHCenter, TextInput.AlignHCenter ] + property var columnWidthMultipliers: [ 0.45, 0.3, 0.25 ] + property var columnHorizontalAligns: [ Text.AlignLeft, Text.AlignHCenter, Text.AlignRight ] function getMaterialTable() { @@ -81,6 +81,7 @@ Column width: Math.round(byLineType.width * byLineType.columnWidthMultipliers[index]) height: contentHeight horizontalAlignment: byLineType.columnHorizontalAligns[index] + color: UM.Theme.getColor("text") font: UM.Theme.getFont("default") wrapMode: Text.WrapAnywhere text: modelData @@ -124,8 +125,8 @@ Column property var printMaterialWeights: PrintInformation.materialWeights property var printMaterialCosts: PrintInformation.materialCosts property var printMaterialNames: PrintInformation.materialNames - property var columnWidthMultipliers: [ 0.4, 0.2, 0.2, 0.2 ] - property var columnHorizontalAligns: [ TextInput.AlignLeft, TextInput.AlignHCenter, TextInput.AlignHCenter, TextInput.AlignHCenter ] + property var columnWidthMultipliers: [ 0.46, 0.18, 0.18, 0.18 ] + property var columnHorizontalAligns: [ Text.AlignLeft, Text.AlignHCenter, Text.AlignHCenter, Text.AlignRight ] function getMaterialTable() { @@ -183,7 +184,8 @@ Column { width: Math.round(byMaterialType.width * byMaterialType.columnWidthMultipliers[index]) height: contentHeight - horizontalAlignment: byLineType.columnHorizontalAligns[index] + horizontalAlignment: byMaterialType.columnHorizontalAligns[index] + color: UM.Theme.getColor("text") font: UM.Theme.getFont("default") wrapMode: Text.WrapAnywhere text: modelData From b6f5dd8f9432f660239170de841dd9bdaababfc4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Feb 2019 13:31:50 +0100 Subject: [PATCH 2/4] Fix display of long names in sync configuration menu --- .../Menus/ConfigurationMenu/ConfigurationItem.qml | 6 +++--- .../ConfigurationMenu/PrintCoreConfiguration.qml | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 296ae62366..5229d021f8 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -52,7 +52,7 @@ Button anchors { left: parent.left - leftMargin: UM.Theme.getSize("wide_margin").width + leftMargin: UM.Theme.getSize("default_margin").width right: parent.right rightMargin: UM.Theme.getSize("wide_margin").width } @@ -63,10 +63,10 @@ Button { id: repeater model: configuration.extruderConfigurations - + width: parent.width delegate: PrintCoreConfiguration { - width: Math.round(parent.width / 2) + width: Math.round(parent.width / configuration.extruderConfigurations.length) printCoreConfiguration: modelData visible: configurationItem.isValidMaterial } diff --git a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml index db6a97aa65..3a4dae425f 100644 --- a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml @@ -7,17 +7,17 @@ import QtQuick.Controls 2.0 import UM 1.2 as UM import Cura 1.0 as Cura -Row +Item { id: extruderInfo property var printCoreConfiguration height: information.height - spacing: UM.Theme.getSize("default_margin").width //Extruder icon. Cura.ExtruderIcon { + id: icon materialColor: printCoreConfiguration.material.color anchors.verticalCenter: parent.verticalCenter extruderEnabled: printCoreConfiguration.material.brand !== "" && printCoreConfiguration.hotendID !== "" @@ -26,6 +26,13 @@ Row Column { id: information + anchors + { + left: icon.right + right: parent.right + margins: UM.Theme.getSize("default_margin").width + } + Label { text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct. @@ -33,6 +40,7 @@ Row elide: Text.ElideRight font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_inactive") + width: parent.width } Label { @@ -41,6 +49,7 @@ Row elide: Text.ElideRight font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text") + width: parent.width } Label { @@ -49,6 +58,7 @@ Row elide: Text.ElideRight font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_inactive") + width: parent.width } } } From 58d998af683a4e9087d2aa090719fe8ae0d9e890 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 6 Feb 2019 11:58:22 +0100 Subject: [PATCH 3/4] Add theme entry for message image Contributes to CL-1222 --- resources/themes/cura-light/theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 34ca84ea6f..573fe8bcfa 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -562,6 +562,7 @@ "message_close": [1, 1], "message_radius": [0.25, 0.25], "message_action_button": [0, 2.0], + "message_image": [15.0, 5.0], "infill_button_margin": [0.5, 0.5], From c7c57c167c802488336bfffa7631b55b6897a255 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Feb 2019 12:37:30 +0100 Subject: [PATCH 4/4] Fix call to non-existing function --- resources/qml/Menus/SettingsMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Menus/SettingsMenu.qml b/resources/qml/Menus/SettingsMenu.qml index 4ea3a4d71a..03367a47e4 100644 --- a/resources/qml/Menus/SettingsMenu.qml +++ b/resources/qml/Menus/SettingsMenu.qml @@ -33,7 +33,7 @@ Menu MenuItem { text: catalog.i18nc("@action:inmenu", "Set as Active Extruder") - onTriggered: Cura.MachineManager.setExtruderIndex(model.index) + onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index) } MenuItem