kvui: always display all tab headers (#1399)
This commit is contained in:
		
							parent
							
								
									8a4298e504
								
							
						
					
					
						commit
						04f726aef2
					
				|  | @ -1,5 +1,5 @@ | ||||||
| <TabbedPanel> | <TabbedPanel> | ||||||
|     tab_width: 200 |     tab_width: root.width / app.tab_count | ||||||
| <SelectableLabel>: | <SelectableLabel>: | ||||||
|     canvas.before: |     canvas.before: | ||||||
|         Color: |         Color: | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								kvui.py
								
								
								
								
							
							
						
						
									
										6
									
								
								kvui.py
								
								
								
								
							|  | @ -330,6 +330,12 @@ class GameManager(App): | ||||||
| 
 | 
 | ||||||
|         super(GameManager, self).__init__() |         super(GameManager, self).__init__() | ||||||
| 
 | 
 | ||||||
|  |     @property | ||||||
|  |     def tab_count(self): | ||||||
|  |         if hasattr(self, "tabs"): | ||||||
|  |             return max(1, len(self.tabs.tab_list)) | ||||||
|  |         return 1 | ||||||
|  | 
 | ||||||
|     def build(self) -> Layout: |     def build(self) -> Layout: | ||||||
|         self.container = ContainerLayout() |         self.container = ContainerLayout() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue