A new option to draw the tab bar centered or right

Fixes #3946
This commit is contained in:
Kovid Goyal
2021-08-18 07:35:04 +05:30
parent 868626c79c
commit a82bc6738c
6 changed files with 38 additions and 1 deletions

View File

@@ -1152,6 +1152,14 @@ class Parser:
def tab_activity_symbol(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['tab_activity_symbol'] = tab_activity_symbol(val)
def tab_bar_align(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
val = val.lower()
if val not in self.choices_for_tab_bar_align:
raise ValueError(f"The value {val} is not a valid choice for tab_bar_align")
ans["tab_bar_align"] = val
choices_for_tab_bar_align = frozenset(('left', 'center', 'right'))
def tab_bar_background(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['tab_bar_background'] = to_color_or_none(val)