Skip to content

Commit

Permalink
Shortcut to search and auto highlight search bar (#405)
Browse files Browse the repository at this point in the history
* search bar text highlight

* add search bar shortcut "/"

Signed-off-by: youhy <[email protected]>

Co-authored-by: Jenn Nguyen <[email protected]>
  • Loading branch information
2 people authored and chapulina committed May 27, 2022
1 parent 54ecdc6 commit 5cd426d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/ignition/gui/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ ApplicationWindow
onActivated: close()
}

Shortcut {
sequence: "/"
onActivated: pluginMenu.open()
}

/**
* Top toolbar
*/
Expand Down
6 changes: 5 additions & 1 deletion include/ignition/gui/qml/PluginMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ Popup {
Material.color(Material.Grey, Material.Shade200):
Material.color(Material.Grey, Material.Shade900);

onOpened: searchField.forceActiveFocus()

onOpened: {
searchField.forceActiveFocus()
searchField.selectAll()
}

ColumnLayout {
anchors.fill: parent
Expand Down

0 comments on commit 5cd426d

Please sign in to comment.