From e5dc90a51917818dc57d0efd944af804ebd395be Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 6 Oct 2021 15:11:14 +0200 Subject: [PATCH] Add USB syncing page to swipe view Looks like a lot of blank space. May need to adjust sizes. Contributes to issue CURA-8609. --- .../Materials/MaterialsSyncDialog.qml | 79 +++++++++++++++++++ .../themes/cura-light/images/insert_usb.svg | 33 ++++++++ 2 files changed, 112 insertions(+) create mode 100644 resources/themes/cura-light/images/insert_usb.svg diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index 34c263bf6b..215ac646ff 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml @@ -341,6 +341,7 @@ Window height: childrenRect.height Layout.preferredWidth: width Layout.preferredHeight: height + Cura.SecondaryButton { anchors.left: parent.left @@ -355,5 +356,83 @@ Window } } } + + Rectangle + { + id: removableDriveSyncPage + color: UM.Theme.getColor("main_background") + + ColumnLayout + { + spacing: UM.Theme.getSize("default_margin").height + anchors.fill: parent + anchors.margins: UM.Theme.getSize("default_margin").width + + Label + { + text: catalog.i18nc("@title:header", "Sync material profiles via USB") + font: UM.Theme.getFont("large_bold") + color: UM.Theme.getColor("text") + Layout.preferredHeight: height + } + Label + { + text: catalog.i18nc("@text In the UI this is followed by a list of steps the user needs to take.", "Follow the following steps to load the new material profiles to your printer.") + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + wrapMode: Text.WordWrap + width: parent.width + Layout.maximumWidth: width + Layout.preferredHeight: height + } + Row + { + width: parent.width + Layout.preferredWidth: width + Layout.fillHeight: true + spacing: UM.Theme.getSize("default_margin").width + + Image + { + source: UM.Theme.getImage("insert_usb") + width: parent.width / 4 + height: width + anchors.verticalCenter: parent.verticalCenter + sourceSize.width: width + } + Label + { + text: "1. " + catalog.i18nc("@text 'hit' as in pressing the button", "Hit the export material archive button.") + + "\n2. " + catalog.i18nc("@text", "Save the .umm file on a USB stick.") + + "\n3. " + catalog.i18nc("@text", "Insert the USB stick into your printer and launch the procedure to load new material profiles.") + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + wrapMode: Text.WordWrap + width: parent.width * 3 / 4 - UM.Theme.getSize("default_margin").width + anchors.verticalCenter: parent.verticalCenter + } + } + Item + { + width: parent.width + height: childrenRect.height + Layout.preferredWidth: width + Layout.preferredHeight: height + + Cura.TertiaryButton + { + anchors.left: parent.left + text: catalog.i18nc("@button", "How to load new material profiles to my printer") + iconSource: UM.Theme.getIcon("LinkExternal") + onClicked: Qt.openUrlExternally("https://www.ultimaker.com") + } + Cura.PrimaryButton + { + anchors.right: parent.right + text: catalog.i18nc("@button", "Export material archive") + } + } + } + } } } \ No newline at end of file diff --git a/resources/themes/cura-light/images/insert_usb.svg b/resources/themes/cura-light/images/insert_usb.svg new file mode 100644 index 0000000000..4a343e1477 --- /dev/null +++ b/resources/themes/cura-light/images/insert_usb.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file