Эх сурвалжийг харах

improve badge palette for terminals with fewer colors

Daniel Sheffield 3 жил өмнө
parent
commit
1683bdc778

+ 1 - 1
app/activities/PriceCheck.py

@@ -107,7 +107,7 @@ class PriceCheck(FocusWidget):
         if _min != _max:
             if current == _max:
                 rating[-1] = '^'
-            self.text_fields['spread'].set_text([f"{_min:>5.2f}", ('popup_focus', chars), f"{_max:<5.2f}"])
+            self.text_fields['spread'].set_text([f"{_min:>5.2f}", ('badge_highlight', chars), f"{_max:<5.2f}"])
             self.text_fields['marker'].set_text(f"{' '*5}{''.join(rating)}{' '*5}")
         else:
             self.text_fields['spread'].set_text('')

+ 2 - 0
price_check.py

@@ -44,6 +44,7 @@ dark_palette = [
     ('streak', 'light gray', 'black'),
     ('bg', 'dark red', 'black'),
     ('badge', 'light gray', 'black'),
+    ('badge_highlight', 'black', 'light gray'),
     ('badge_good', 'black', 'light green'),
     ('badge_bad', 'black', 'light red'),
     ('badge_neutral', 'white', 'dark gray'),
@@ -56,6 +57,7 @@ light_palette = [
     ('streak', 'white', 'dark blue'),
     ('bg', 'white', 'dark blue'),
     ('badge', 'white', 'dark blue'),
+    ('badge_highlight', 'dark blue', 'white'),
     ('badge_good', 'white', 'light green'),
     ('badge_bad', 'white', 'light red'),
     ('badge_neutral', 'white', 'dark gray'),