mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Use re-usable search-bar for Settings search as well.
done as part of CURA-8559
This commit is contained in:
parent
24eaad4c6d
commit
87f94e680b
@ -15,6 +15,7 @@ Cura.TextField
|
||||
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
|
||||
|
||||
placeholderText: catalog.i18nc("@placeholder", "Search")
|
||||
font.italic: true
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -41,39 +41,19 @@ Item
|
||||
repeat: false
|
||||
}
|
||||
|
||||
Cura.TextField
|
||||
Cura.SearchBar
|
||||
{
|
||||
id: filter
|
||||
height: parent.height
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
|
||||
placeholderText: catalog.i18nc("@label:textbox", "Search settings")
|
||||
font.italic: true
|
||||
|
||||
placeholderText: catalog.i18nc("@label:textbox", "Search settings") // Overwrite
|
||||
|
||||
property var expandedCategories
|
||||
property bool lastFindingSettings: false
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: searchIcon
|
||||
|
||||
anchors
|
||||
{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
source: UM.Theme.getIcon("search")
|
||||
height: UM.Theme.getSize("small_button_icon").height
|
||||
width: height
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
|
||||
onTextChanged:
|
||||
{
|
||||
settingsSearchTimer.restart()
|
||||
}
|
||||
onTextChanged: settingsSearchTimer.restart()
|
||||
|
||||
onEditingFinished:
|
||||
{
|
||||
@ -86,10 +66,7 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onEscapePressed:
|
||||
{
|
||||
filter.text = ""
|
||||
}
|
||||
Keys.onEscapePressed: filter.text = ""
|
||||
|
||||
function updateDefinitionModel()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user