Fix: Actually make SearchBar-component independant.

It still depended on the Digital Library 'parent'.

part of CURA-8559
This commit is contained in:
Remco Burema 2021-11-12 11:49:37 +01:00
parent 977a12c989
commit b5d58f78d7
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 3 additions and 3 deletions

View file

@ -47,6 +47,8 @@ Item
Cura.SearchBar Cura.SearchBar
{ {
id: searchBar id: searchBar
Layout.fillWidth: true
implicitHeight: createNewProjectButton.height
onTextEdited: manager.projectFilter = text //Update the search filter when editing this text field. onTextEdited: manager.projectFilter = text //Update the search filter when editing this text field.
} }

View file

@ -12,8 +12,6 @@ Cura.TextField
{ {
UM.I18nCatalog { id: catalog; name: "cura" } UM.I18nCatalog { id: catalog; name: "cura" }
Layout.fillWidth: true
implicitHeight: createNewProjectButton.height
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2 leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
placeholderText: catalog.i18nc("@placeholder", "Search") placeholderText: catalog.i18nc("@placeholder", "Search")
@ -28,7 +26,7 @@ Cura.TextField
left: parent.left left: parent.left
leftMargin: UM.Theme.getSize("default_margin").width leftMargin: UM.Theme.getSize("default_margin").width
} }
source: UM.Theme.getIcon("search") source: UM.Theme.getIcon("Magnifier")
height: UM.Theme.getSize("small_button_icon").height height: UM.Theme.getSize("small_button_icon").height
width: height width: height
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")