Center the status bar.
- Without any indicators on the right, the bar can be centered.
This commit is contained in:
parent
4881baf6ef
commit
81a1901d38
2 changed files with 2 additions and 3 deletions
|
|
@ -963,8 +963,7 @@ class Screen:
|
||||||
@functools.lru_cache(maxsize=2)
|
@functools.lru_cache(maxsize=2)
|
||||||
def _get_status_bar_appearance(self, width, progress_bar_size):
|
def _get_status_bar_appearance(self, width, progress_bar_size):
|
||||||
bar_transparency = 0.7
|
bar_transparency = 0.7
|
||||||
spacing = " " * (width - len(self._STATUS_BAR))
|
bar = self._STATUS_BAR.center(width)[:width]
|
||||||
bar = (self._STATUS_BAR[:width] + spacing)[:width]
|
|
||||||
fraction, whole = math.modf(progress_bar_size)
|
fraction, whole = math.modf(progress_bar_size)
|
||||||
whole = int(whole)
|
whole = int(whole)
|
||||||
if whole < len(bar) and bar[whole].data == " ":
|
if whole < len(bar) and bar[whole].data == " ":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue