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
This commit is contained in:
Konstantinos Karmas 2021-08-06 09:47:47 +02:00
parent b78651e45f
commit 22e407207f

View file

@ -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