mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Stylise search bar
This is the standard style for text fields in Cura. The spacing around the search icon is customised with the best approximation I could get using a simple string of placeholderText. Contributes to issue CURA-8009.
This commit is contained in:
parent
1269c28d0a
commit
13ca30ed98
1 changed files with 9 additions and 2 deletions
|
@ -43,13 +43,20 @@ Item
|
|||
}
|
||||
height: childrenRect.height
|
||||
|
||||
TextField
|
||||
Cura.TextField
|
||||
{
|
||||
id: searchBar
|
||||
Layout.fillWidth: true
|
||||
height: createNewProjectButton.height
|
||||
|
||||
onTextEdited: manager.projectFilter = text
|
||||
onTextEdited: manager.projectFilter = text //Update the search filter when editing this text field.
|
||||
|
||||
placeholderText:
|
||||
{
|
||||
var image_size = "width=\"" + UM.Theme.getSize("small_button_icon").width + "\" height=\"" + UM.Theme.getSize("small_button_icon").height + "\" ";
|
||||
var image_source = "src=\"" + UM.Theme.getIcon("Magnifier") + "\"";
|
||||
return "<img align=\"middle\" " + image_size + image_source + "> Search";
|
||||
}
|
||||
}
|
||||
|
||||
Cura.SecondaryButton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue