From 4881baf6ef2b5db677c25ed83ebf0f70d3064de4 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 21 Dec 2019 12:43:50 +1000 Subject: [PATCH] Dropped the ordering indicator. - Couldn't justify it alone, without the pause indicator too. - Still get some feedback from the log message when changing order. --- eris/__main__.py | 13 ++++--------- tests/golden-files/help | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index a0391e0..127e6de 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -961,14 +961,10 @@ class Screen: for char in fill3.ScrollBar._PARTIAL_CHARS[1]] @functools.lru_cache(maxsize=2) - def _get_status_bar_appearance(self, width, is_directory_sort, - progress_bar_size): + def _get_status_bar_appearance(self, width, progress_bar_size): bar_transparency = 0.7 - ordering_text = "directory" if is_directory_sort else "type " - indicator = f"{ordering_text} " - spacing = " " * (width - len(self._STATUS_BAR) - len(indicator)) - bar = (self._STATUS_BAR[:width - len(indicator)] + spacing + - indicator)[:width] + spacing = " " * (width - len(self._STATUS_BAR)) + bar = (self._STATUS_BAR[:width] + spacing)[:width] fraction, whole = math.modf(progress_bar_size) whole = int(whole) if whole < len(bar) and bar[whole].data == " ": @@ -986,8 +982,7 @@ class Screen: incomplete = self._summary.result_total - self._summary.completed_total progress_bar_size = max(0, width * incomplete / self._summary.result_total) - return self._get_status_bar_appearance( - width, self._summary.is_directory_sort, progress_bar_size) + return self._get_status_bar_appearance(width, progress_bar_size) def appearance(self, dimensions): self._fix_listing() diff --git a/tests/golden-files/help b/tests/golden-files/help index bbb74b8..47490f1 100644 --- a/tests/golden-files/help +++ b/tests/golden-files/help @@ -57,4 +57,4 @@ │ │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ - help quit tab:focus turn log edit next order refresh fullscreen xdg-open directory  \ No newline at end of file + help quit tab:focus turn log edit next order refresh fullscreen xdg-open  \ No newline at end of file