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
|
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
|
||||||
|
|
||||||
placeholderText: catalog.i18nc("@placeholder", "Search")
|
placeholderText: catalog.i18nc("@placeholder", "Search")
|
||||||
|
font.italic: true
|
||||||
|
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
|
@ -41,39 +41,19 @@ Item
|
|||||||
repeat: false
|
repeat: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.TextField
|
Cura.SearchBar
|
||||||
{
|
{
|
||||||
id: filter
|
id: filter
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
|
|
||||||
placeholderText: catalog.i18nc("@label:textbox", "Search settings")
|
placeholderText: catalog.i18nc("@label:textbox", "Search settings") // Overwrite
|
||||||
font.italic: true
|
|
||||||
|
|
||||||
property var expandedCategories
|
property var expandedCategories
|
||||||
property bool lastFindingSettings: false
|
property bool lastFindingSettings: false
|
||||||
|
|
||||||
UM.RecolorImage
|
onTextChanged: settingsSearchTimer.restart()
|
||||||
{
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
|
|
||||||
onEditingFinished:
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
@ -86,10 +66,7 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onEscapePressed:
|
Keys.onEscapePressed: filter.text = ""
|
||||||
{
|
|
||||||
filter.text = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateDefinitionModel()
|
function updateDefinitionModel()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user