From c2057c94db469652235146a5a27602ca8c69ef0e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 12 Oct 2021 17:28:09 +0200 Subject: [PATCH] Only show troubleshooting link if there is an error And show it next to the error. Contributes to issue CURA-8609. --- .../Materials/MaterialsSyncDialog.qml | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index a3a06f6242..49ac522b1f 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml @@ -231,14 +231,33 @@ Window color: UM.Theme.getColor("text") } } - Label + Row { - id: syncStatusLabel + Layout.preferredWidth: parent.width + Layout.preferredHeight: contentRect.height - visible: text !== "" - text: "" - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("medium") + Label + { + id: syncStatusLabel + + width: parent.width - UM.Theme.getSize("default_margin").width - troubleshootingLink.width + anchors.verticalCenter: troubleshootingLink.verticalCenter + + elide: Text.ElideRight + visible: text !== "" + text: "" + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("medium") + } + Cura.TertiaryButton + { + id: troubleshootingLink + text: catalog.i18nc("@button", "Troubleshooting") + visible: typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "error" + iconSource: UM.Theme.getIcon("LinkExternal") + Layout.preferredHeight: height + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-troubleshoot-cloud-printer") + } } ScrollView { @@ -416,13 +435,6 @@ Window } } } - Cura.TertiaryButton - { - text: catalog.i18nc("@button", "Troubleshooting") - iconSource: UM.Theme.getIcon("LinkExternal") - Layout.preferredHeight: height - onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-troubleshoot-cloud-printer") - } Item { width: parent.width