add Ctrl+8 navigation shortcut for radios page

This commit is contained in:
Drew Weymouth
2024-06-02 07:43:23 -07:00
parent b7af1e716c
commit 50a66284bb
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ func (b *BrowsingPane) EnableNavigationButtons() {
func (b *BrowsingPane) ActivateNavigationButton(num int) {
if num < len(b.navBtnsContainer.Objects) {
btn := b.navBtnsContainer.Objects[num].(*widget.Button)
if !btn.Disabled() {
if !btn.Disabled() && !btn.Hidden {
btn.OnTapped()
}
}
+2 -1
View File
@@ -36,9 +36,10 @@ var (
ShortcutNavFive = desktop.CustomShortcut{KeyName: fyne.Key5, Modifier: os.ControlModifier}
ShortcutNavSix = desktop.CustomShortcut{KeyName: fyne.Key6, Modifier: os.ControlModifier}
ShortcutNavSeven = desktop.CustomShortcut{KeyName: fyne.Key7, Modifier: os.ControlModifier}
ShortcutNavEight = desktop.CustomShortcut{KeyName: fyne.Key8, Modifier: os.ControlModifier}
NavShortcuts = []desktop.CustomShortcut{ShortcutNavOne, ShortcutNavTwo, ShortcutNavThree,
ShortcutNavFour, ShortcutNavFive, ShortcutNavSix, ShortcutNavSeven}
ShortcutNavFour, ShortcutNavFive, ShortcutNavSix, ShortcutNavSeven, ShortcutNavEight}
)
type MainWindow struct {