From 22e407207f69839452e3dc2201ef7da466db7148 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 6 Aug 2021 09:47:47 +0200 Subject: [PATCH 1/3] Manually add the magnifier icon in the search bar in DL The `leftIcon` property, which is not available in 4.9 and 4.10, so the DigitalLibrary window wasn't getting drawn. To keep having the icon, I manually added the RecolorImage in the search textfield. CURA-8444 --- .../resources/qml/SelectProjectPage.qml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml index 8b919e299d..ffa34feb45 100644 --- a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml @@ -49,11 +49,27 @@ Item id: searchBar Layout.fillWidth: true implicitHeight: createNewProjectButton.height + leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2 onTextEdited: manager.projectFilter = text //Update the search filter when editing this text field. - leftIcon: UM.Theme.getIcon("Magnifier") placeholderText: "Search" + + UM.RecolorImage + { + id: searchIcon + + anchors + { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + } + source: UM.Theme.getIcon("Magnifier") + height: UM.Theme.getSize("small_button_icon").height + width: height + color: UM.Theme.getColor("text") + } } Cura.SecondaryButton From 10ec9e2754d2596f33f855ed89b0f37aea1d9f6d Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 6 Aug 2021 09:49:29 +0200 Subject: [PATCH 2/3] Remove the tooltipWidth property The `tooltipWidth` property is not available in 4.9 and 4.10. This property was added to make sure that the tooltip has a smaller width than the DigitalLibrary window, or else the tooltip doesn't get drawn at all, which is confusing. Since it was not available in 4.9 and 4.10, the tooltip text smaller had to become smaller to make sure that it will fit. CURA-8444 --- plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml index ffa34feb45..d0c653b014 100644 --- a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml @@ -94,8 +94,7 @@ Item text: "Upgrade plan" iconSource: UM.Theme.getIcon("LinkExternal") visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed) - tooltip: "You have reached the maximum number of projects allowed by your subscription. Please upgrade to the Professional subscription to create more projects." - tooltipWidth: parent.width * 0.5 + tooltip: "Maximum number of projects reached. Please upgrade your subscription to create more projects." onClicked: Qt.openUrlExternally("https://ultimaker.com/software/ultimaker-essentials/sign-up-cura?utm_source=cura&utm_medium=software&utm_campaign=lib-max") } From 97c779cc53319f6f97c2281df2d80d6b35b92bb8 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 6 Aug 2021 09:50:04 +0200 Subject: [PATCH 3/3] Use the old icon names So that they can still be found in 4.9 and 4.10 Cura version. CURA-8444 --- plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml index d0c653b014..391c3a0fcc 100644 --- a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml @@ -65,7 +65,7 @@ Item left: parent.left leftMargin: UM.Theme.getSize("default_margin").width } - source: UM.Theme.getIcon("Magnifier") + source: UM.Theme.getIcon("search") height: UM.Theme.getSize("small_button_icon").height width: height color: UM.Theme.getColor("text") @@ -92,7 +92,7 @@ Item id: upgradePlanButton text: "Upgrade plan" - iconSource: UM.Theme.getIcon("LinkExternal") + iconSource: UM.Theme.getIcon("external_link") visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed) tooltip: "Maximum number of projects reached. Please upgrade your subscription to create more projects."