Skip to content

Commit

Permalink
add remove tab helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Sep 19, 2024
1 parent 7437924 commit 4869573
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kvui.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, MDDivider(size_hint_y=None, height=dp(4)), self.carousel, **kwargs)
self.size_hint_y = 1

def remove_tab(self, tab, content=None):
if content is None:
content = tab.content
self.ids.container.remove_widget(tab)
self.carousel.remove_widget(content)
self.on_size(self, self.size)

class GameManager(MDApp):
logging_pairs = [
Expand Down

0 comments on commit 4869573

Please sign in to comment.