Merge pull request #3388 from myk002/myk_tab_defaults

give widgets.TabBar default hotkeys
develop
Myk 2023-05-17 11:23:17 -07:00 committed by GitHub
commit 20c6062b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

@ -5113,7 +5113,9 @@ This widget implements a set of one or more tabs to allow navigation between gro
the width of the window and will continue rendering on the next line(s) if all tabs cannot fit on a single line. the width of the window and will continue rendering on the next line(s) if all tabs cannot fit on a single line.
:key: Specifies a keybinding that can be used to switch to the next tab. :key: Specifies a keybinding that can be used to switch to the next tab.
:key_back: Specifies a keybinding that can be used to switch to the previous tab. Defaults to ``CUSTOM_CTRL_T``.
:key_back: Specifies a keybinding that can be used to switch to the previous
tab. Defaults to ``CUSTOM_CTRL_Y``.
:labels: A table of strings; entry representing the label text for a single tab. The order of the entries :labels: A table of strings; entry representing the label text for a single tab. The order of the entries
determines the order the tabs will appear in. determines the order the tabs will appear in.
:on_select: Callback executed when a tab is selected. It receives the selected tab index as an argument. The provided function :on_select: Callback executed when a tab is selected. It receives the selected tab index as an argument. The provided function

@ -2241,8 +2241,8 @@ TabBar.ATTRS{
active_tab_pens=DEFAULT_ACTIVE_TAB_PENS, active_tab_pens=DEFAULT_ACTIVE_TAB_PENS,
inactive_tab_pens=DEFAULT_INACTIVE_TAB_PENS, inactive_tab_pens=DEFAULT_INACTIVE_TAB_PENS,
get_pens=DEFAULT_NIL, get_pens=DEFAULT_NIL,
key=DEFAULT_NIL, key='CUSTOM_CTRL_T',
key_back=DEFAULT_NIL, key_back='CUSTOM_CTRL_Y',
} }
function TabBar:init() function TabBar:init()