add Ctrl+(num) shortcuts for the navigation buttons

This commit is contained in:
Drew Weymouth
2023-02-20 16:53:20 -08:00
parent c9cd0922ea
commit ba25e432c8
2 changed files with 25 additions and 0 deletions
+7
View File
@@ -123,6 +123,13 @@ func (b *BrowsingPane) EnableNavigationButtons() {
}
}
func (b *BrowsingPane) ActivateNavigationButton(num int) {
if num < len(b.navBtnsContainer.Objects) {
btn := b.navBtnsContainer.Objects[num].(*widget.Button)
btn.OnTapped()
}
}
func (b *BrowsingPane) GetSearchBarIfAny() fyne.Focusable {
if s, ok := b.curPage.(Searchable); ok {
return s.SearchWidget()