From 22e407207f69839452e3dc2201ef7da466db7148 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 6 Aug 2021 09:47:47 +0200 Subject: [PATCH] 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