From dc34fbc0474e17b3826cd6f4d989b9d190aa66be Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Tue, 26 Mar 2024 16:35:59 +0100 Subject: [PATCH 1/2] learn more button alligned in UCP CURA-11781 --- plugins/3MFReader/WorkspaceDialog.qml | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index d7e776411f..41e9b00671 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -24,29 +24,29 @@ UM.Dialog { height: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height color: UM.Theme.getColor("main_background") - - UM.Label + RowLayout { - id: titleLabel - text: manager.isUcp? catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project") - font: UM.Theme.getFont("large") - anchors.top: parent.top - anchors.left: parent.left - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.leftMargin: UM.Theme.getSize("default_margin").height - } - - Cura.TertiaryButton - { - id: learnMoreButton - visible: manager.isUcp - anchors.right: parent.right - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.rightMargin: UM.Theme.getSize("default_margin").height - text: catalog.i18nc("@button", "Learn more") - iconSource: UM.Theme.getIcon("LinkExternal") - isIconOnRightSide: true - onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979") + UM.Label + { + id: titleLabel + text: manager.isUcp? catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project") + font: UM.Theme.getFont("large") + anchors.left: parent.left + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.leftMargin: UM.Theme.getSize("default_margin").height + } + Cura.TertiaryButton + { + id: learnMoreButton + visible: manager.isUcp + text: catalog.i18nc("@button", "Learn more") + iconSource: UM.Theme.getIcon("LinkExternal") + anchors.left: titleLabel.right + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.leftMargin: UM.Theme.getSize("default_margin").height + isIconOnRightSide: true + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979") + } } } From 55d4cd44c4519097e95f7fff86dfed1398db0592 Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Thu, 28 Mar 2024 09:51:06 +0100 Subject: [PATCH 2/2] Aligning the title horizontally CURA-11781 --- plugins/3MFReader/WorkspaceDialog.qml | 45 +++++++++++++++------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 41e9b00671..eeb33da4c7 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -24,28 +24,33 @@ UM.Dialog { height: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height color: UM.Theme.getColor("main_background") - RowLayout + ColumnLayout { - UM.Label + id: headerColumn + + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: anchors.leftMargin + RowLayout { - id: titleLabel - text: manager.isUcp? catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project") - font: UM.Theme.getFont("large") - anchors.left: parent.left - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.leftMargin: UM.Theme.getSize("default_margin").height - } - Cura.TertiaryButton - { - id: learnMoreButton - visible: manager.isUcp - text: catalog.i18nc("@button", "Learn more") - iconSource: UM.Theme.getIcon("LinkExternal") - anchors.left: titleLabel.right - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.leftMargin: UM.Theme.getSize("default_margin").height - isIconOnRightSide: true - onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979") + UM.Label + { + id: titleLabel + text: manager.isUcp? catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Open Universal Cura Project (UCP)"): catalog.i18nc("@action:title", "Summary - Cura Project") + font: UM.Theme.getFont("large") + } + Cura.TertiaryButton + { + id: learnMoreButton + visible: manager.isUcp + text: catalog.i18nc("@button", "Learn more") + iconSource: UM.Theme.getIcon("LinkExternal") + isIconOnRightSide: true + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979") + } } } }