mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Wallpaper Selector: auto-focus search field
This commit is contained in:
@@ -148,6 +148,7 @@ NPanel {
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
id: searchInput
|
||||
placeholderText: "Type to filter wallpapers..."
|
||||
text: filterText
|
||||
onTextChanged: {
|
||||
@@ -155,6 +156,11 @@ NPanel {
|
||||
updateFiltered()
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
Component.onCompleted: {
|
||||
if (searchInput.inputItem && searchInput.inputItem.visible) {
|
||||
searchInput.inputItem.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +193,6 @@ NPanel {
|
||||
anchors.fill: parent
|
||||
model: filteredWallpapers
|
||||
interactive: false
|
||||
clip: true
|
||||
|
||||
property int columns: 4
|
||||
property int itemSize: Math.floor((width - leftMargin - rightMargin - (columns * Style.marginS * scaling)) / columns)
|
||||
|
||||
Reference in New Issue
Block a user