@@ -50,14 +50,14 @@ class TabLayout(displayio.Group):
5050 :param Optional[Union[BuiltinFont, BDF, PCF]] custom_font: A pre-loaded font object to use
5151 for the tab labels
5252 :param str inactive_tab_spritesheet: Filepath of the spritesheet to show for inactive tabs.
53- :param str active_tab_spritesheet : Filepath of the spritesheet to show for the active tab.
54- :param Optional[int, tuple[int, int, int]] active_tab_text_color : Hex or tuple color to use
53+ :param str showing_tab_spritesheet : Filepath of the spritesheet to show for the active tab.
54+ :param Optional[int, tuple[int, int, int]] showing_tab_text_color : Hex or tuple color to use
5555 for the active tab label
5656 :param Optional[int, tuple[int, int, int]] inactive_tab_text_color: Hex or tuple color to
5757 use for inactive tab labels
5858 :param Optional[Union[int, tuple[int, int]]] inactive_tab_transparent_indexes: single index
5959 or tuple of multiple indexes to be made transparent in the inactive tab sprite palette.
60- :param Optional[Union[int, tuple[int, int]]] active_tab_transparent_indexes : single index
60+ :param Optional[Union[int, tuple[int, int]]] showing_tab_transparent_indexes : single index
6161 or tuple of multiple indexes to be made transparent in the active tab sprite palette.
6262 :param int tab_count: How many tabs to draw in the layout. Positive whole numbers are valid.
6363 """
@@ -72,11 +72,11 @@ def __init__(
7272 tab_text_scale : int = 1 ,
7373 custom_font : Optional [Union [BuiltinFont , BDF , PCF ]] = terminalio .FONT ,
7474 inactive_tab_spritesheet : Optional [str ] = None ,
75- active_tab_spritesheet : Optional [str ] = None ,
76- active_tab_text_color : Optional [Union [int , Tuple [int , int , int ]]] = 0x999999 ,
75+ showing_tab_spritesheet : Optional [str ] = None ,
76+ showing_tab_text_color : Optional [Union [int , Tuple [int , int , int ]]] = 0x999999 ,
7777 inactive_tab_text_color : Optional [Union [int , Tuple [int , int , int ]]] = 0xFFFFF ,
7878 inactive_tab_transparent_indexes : Optional [Union [int , Tuple [int , int ]]] = None ,
79- active_tab_transparent_indexes : Optional [Union [int , Tuple [int , int ]]] = None ,
79+ showing_tab_transparent_indexes : Optional [Union [int , Tuple [int , int ]]] = None ,
8080 tab_count : int = None ,
8181 ):
8282
@@ -88,24 +88,24 @@ def __init__(
8888 display = board .DISPLAY
8989 if inactive_tab_spritesheet is None :
9090 raise AttributeError ("Must pass active_tab_spritesheet" )
91- if active_tab_spritesheet is None :
91+ if showing_tab_spritesheet is None :
9292 raise AttributeError ("Must pass inactive_tab_spritesheet" )
9393 if tab_count is None :
9494 raise AttributeError ("Must pass tab_count" )
9595
9696 super ().__init__ (x = x , y = y )
9797 self .tab_count = tab_count
9898 self ._active_bmp , self ._active_palette = adafruit_imageload .load (
99- active_tab_spritesheet
99+ showing_tab_spritesheet
100100 )
101101 self ._inactive_bmp , self ._inactive_palette = adafruit_imageload .load (
102102 inactive_tab_spritesheet
103103 )
104104
105- if isinstance (active_tab_transparent_indexes , int ):
106- self ._active_palette .make_transparent (active_tab_transparent_indexes )
107- elif isinstance (active_tab_transparent_indexes , tuple ):
108- for index in active_tab_transparent_indexes :
105+ if isinstance (showing_tab_transparent_indexes , int ):
106+ self ._active_palette .make_transparent (showing_tab_transparent_indexes )
107+ elif isinstance (showing_tab_transparent_indexes , tuple ):
108+ for index in showing_tab_transparent_indexes :
109109 self ._active_palette .make_transparent (index )
110110 else :
111111 raise AttributeError ("active_tab_transparent_indexes must be int or tuple" )
@@ -122,7 +122,7 @@ def __init__(
122122
123123 self .tab_height = self ._active_bmp .height
124124 self .display = display
125- self .active_tab_text_color = active_tab_text_color
125+ self .active_tab_text_color = showing_tab_text_color
126126 self .inactive_tab_text_color = inactive_tab_text_color
127127 self .custom_font = custom_font
128128 self .tab_text_scale = tab_text_scale
0 commit comments