Center the status bar.

- Without any indicators on the right, the bar can be centered.
This commit is contained in:
Andrew Hamilton 2019-12-21 12:50:46 +10:00
parent 4881baf6ef
commit 81a1901d38
2 changed files with 2 additions and 3 deletions

View file

@ -963,8 +963,7 @@ class Screen:
@functools.lru_cache(maxsize=2)
def _get_status_bar_appearance(self, width, progress_bar_size):
bar_transparency = 0.7
spacing = " " * (width - len(self._STATUS_BAR))
bar = (self._STATUS_BAR[:width] + spacing)[:width]
bar = self._STATUS_BAR.center(width)[:width]
fraction, whole = math.modf(progress_bar_size)
whole = int(whole)
if whole < len(bar) and bar[whole].data == " ":

View file

@ -57,4 +57,4 @@
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
 help quit tab:focus turn log edit next order refresh fullscreen xdg-open 
 help quit tab:focus turn log edit next order refresh fullscreen xdg-open