Bigger HDD font, brighter color, clock centered

This commit is contained in:
Joan
2025-12-31 12:41:40 +01:00
parent b7893b068b
commit 9064605557

View File

@@ -110,7 +110,7 @@ class Matrix64Display(SampleBase):
# Colors
time_color = graphics.Color(30, 90, 220)
humidity_color = graphics.Color(80, 160, 255)
hdd_color = graphics.Color(80, 80, 80)
hdd_color = graphics.Color(140, 120, 100) # Warm tan, easier to read
label_color = graphics.Color(120, 120, 120)
# Initial fetch
@@ -134,19 +134,19 @@ class Matrix64Display(SampleBase):
# === Weather Icon (top-left, 24x24) ===
draw_weather_icon(canvas, 0, 0, self.weather_desc)
# === HDD Temps (top-right, next to weather icon) ===
# === HDD Temps (top-right, 5x8 font) ===
if self.hdd_temps and len(self.hdd_temps) > 1:
temps = [str(int(t[0])) for t in self.hdd_temps[1:] if t]
if len(temps) >= 3:
row1 = " ".join(temps[:3])
graphics.DrawText(canvas, small_font, 28, 8, hdd_color, row1)
graphics.DrawText(canvas, data_font, 26, 8, hdd_color, row1)
if len(temps) > 3:
row2 = " ".join(temps[3:6])
graphics.DrawText(canvas, small_font, 28, 16, hdd_color, row2)
graphics.DrawText(canvas, data_font, 26, 18, hdd_color, row2)
# === Clock (centered, y=32) ===
# === Clock (centered vertically, y=38) ===
time_x = (64 - len(time_str) * 7) // 2
graphics.DrawText(canvas, time_font, time_x, 32, time_color, time_str)
graphics.DrawText(canvas, time_font, time_x, 38, time_color, time_str)
# === Outdoor: Out + temp + humidity (y=50, 5x8 font) ===
graphics.DrawText(canvas, data_font, 0, 50, label_color, "Out")