Skip to content

Commit

Permalink
Added warning for tab_bar_pos value apart from top/bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
xantric committed Mar 23, 2024
1 parent 6bd3e64 commit 9e7a9a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fury/ui/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,15 @@ def _get_size(self):
def update_tabs(self):
"""Update position, size and callbacks for tab panels."""
self.tab_panel_size = (self.size[0] // self.nb_tabs, int(0.1 * self.size[1]))
if self.tab_bar_pos.lower() not in ['top', 'bottom']:
print("WARNING: tab_bar_pos can only have value top/bottom")
self.tab_bar_pos = "top"

Check warning on line 745 in fury/ui/containers.py

View check run for this annotation

Codecov / codecov/patch

fury/ui/containers.py#L744-L745

Added lines #L744 - L745 were not covered by tests

if self.tab_bar_pos.lower() == "top":
tab_panel_pos = [0.0, 0.9]
elif self.tab_bar_pos.lower() == "bottom":
tab_panel_pos = [0.0, 0.0]

for tab_panel in self.tabs:
tab_panel.resize(self.tab_panel_size)
tab_panel.content_panel.position = self.position
Expand Down

0 comments on commit 9e7a9a1

Please sign in to comment.