Bigger HDD font, brighter color, clock centered
This commit is contained in:
12
matrix.py
12
matrix.py
@@ -110,7 +110,7 @@ class Matrix64Display(SampleBase):
|
|||||||
# Colors
|
# Colors
|
||||||
time_color = graphics.Color(30, 90, 220)
|
time_color = graphics.Color(30, 90, 220)
|
||||||
humidity_color = graphics.Color(80, 160, 255)
|
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)
|
label_color = graphics.Color(120, 120, 120)
|
||||||
|
|
||||||
# Initial fetch
|
# Initial fetch
|
||||||
@@ -134,19 +134,19 @@ class Matrix64Display(SampleBase):
|
|||||||
# === Weather Icon (top-left, 24x24) ===
|
# === Weather Icon (top-left, 24x24) ===
|
||||||
draw_weather_icon(canvas, 0, 0, self.weather_desc)
|
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:
|
if self.hdd_temps and len(self.hdd_temps) > 1:
|
||||||
temps = [str(int(t[0])) for t in self.hdd_temps[1:] if t]
|
temps = [str(int(t[0])) for t in self.hdd_temps[1:] if t]
|
||||||
if len(temps) >= 3:
|
if len(temps) >= 3:
|
||||||
row1 = " ".join(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:
|
if len(temps) > 3:
|
||||||
row2 = " ".join(temps[3:6])
|
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
|
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) ===
|
# === Outdoor: Out + temp + humidity (y=50, 5x8 font) ===
|
||||||
graphics.DrawText(canvas, data_font, 0, 50, label_color, "Out")
|
graphics.DrawText(canvas, data_font, 0, 50, label_color, "Out")
|
||||||
|
|||||||
Reference in New Issue
Block a user