mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
This commit is contained in:
commit
38c76fe86b
2 changed files with 7 additions and 7 deletions
|
|
@ -84,7 +84,7 @@ Scope {
|
|||
|
||||
function setSearchingText(text) {
|
||||
searchWidget.setSearchingText(text);
|
||||
searchWidget.focusFirstItemIfNeeded();
|
||||
searchWidget.focusFirstItem();
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -75,9 +75,8 @@ Item { // Wrapper
|
|||
},
|
||||
]
|
||||
|
||||
function focusFirstItemIfNeeded() {
|
||||
if (searchInput.focus)
|
||||
appResults.currentIndex = 0; // Focus the first item
|
||||
function focusFirstItem() {
|
||||
appResults.currentIndex = 0;
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
@ -99,7 +98,7 @@ Item { // Wrapper
|
|||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
root.mathResult = data;
|
||||
root.focusFirstItemIfNeeded();
|
||||
root.focusFirstItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -277,6 +276,9 @@ Item { // Wrapper
|
|||
|
||||
model: ScriptModel {
|
||||
id: model
|
||||
onValuesChanged: {
|
||||
root.focusFirstItem();
|
||||
}
|
||||
values: {
|
||||
// Search results are handled here
|
||||
////////////////// Skip? //////////////////
|
||||
|
|
@ -405,8 +407,6 @@ Item { // Wrapper
|
|||
}
|
||||
}
|
||||
|
||||
onModelChanged: root.focusFirstItemIfNeeded()
|
||||
|
||||
delegate: SearchItem {
|
||||
// The selectable item for each search result
|
||||
required property var modelData
|
||||
|
|
|
|||
Loading…
Reference in a new issue