All screens: drop gray text, matching the Journey fix
The epd4in0e panel's palette has no gray at all (just black/white/ yellow/red/blue/green -- see epd4in0e.py's putpalette), so any gray RGB fill gets Floyd-Steinberg dithered into a black/white checkerboard across the whole glyph body. At the small font sizes most of these screens use (Navidrome's artist/album/genre/source lines, Departures' direction/platform columns, Weather's description/forecast labels, Clock's date line, the placeholder messages), that reads as blurry, half-rendered text -- same root cause already fixed in Journey. Switched every gray fill/outline to solid black across navidrome.py, weather.py, departures.py, clock.py, and picture.py. Left the intentionally-faint row-divider hairlines (228,228,228) alone -- those are meant to almost disappear, not readable text. Removed departures.py's now-unused MUTED constant.
This commit is contained in:
1 parent
4c10ff94d2
commit
132e133b1d
5 files changed
+20
-21
No files matched your search
@@ -30,7 +30,6 @@ RESULTS_CHOICES = (3, 5, 8)
|
||||
|
||||
BLACK = (0, 0, 0)
|
||||
RED = (200, 0, 0)
|
||||
MUTED = (110, 110, 110)
|
||||
FAINT_LINE = (228, 228, 228)
|
||||
|
||||
|
||||
@@ -167,7 +166,7 @@ class DeparturesScreen(Screen):
|
||||
self._draw_centered_v(draw, line_text, line_font, pad, row_cy, BLACK)
|
||||
|
||||
direction = truncate_to_width(draw, dep["direction"], dir_font, dir_w - 10)
|
||||
self._draw_centered_v(draw, direction, dir_font, dir_x, row_cy, (60, 60, 60))
|
||||
self._draw_centered_v(draw, direction, dir_font, dir_x, row_cy, BLACK)
|
||||
|
||||
if dep["cancelled"]:
|
||||
time_text, time_color = "Fällt aus", RED
|
||||
@@ -184,7 +183,7 @@ class DeparturesScreen(Screen):
|
||||
pw = text_width(draw, platform_text, platform_font)
|
||||
self._draw_centered_v(
|
||||
draw, platform_text, platform_font,
|
||||
platform_x + (platform_w - pw) / 2, row_cy, MUTED,
|
||||
platform_x + (platform_w - pw) / 2, row_cy, BLACK,
|
||||
)
|
||||
|
||||
return image
|
||||
@@ -192,7 +191,7 @@ class DeparturesScreen(Screen):
|
||||
def _render_message(self, draw, width, height, scale, msg):
|
||||
font = load_font(size=int(scale * 0.06))
|
||||
mw = text_width(draw, msg, font)
|
||||
draw.text(((width - mw) / 2, height / 2), msg, font=font, fill=MUTED)
|
||||
draw.text(((width - mw) / 2, height / 2), msg, font=font, fill=BLACK)
|
||||
|
||||
def _draw_centered_v(self, draw, text, font, x, cy, fill):
|
||||
left, top, right, bottom = draw.textbbox((0, 0), text, font=font)
|
||||
|
||||
Reference in new issue
Block a user