HDD temps: 3 rows of 2, closer spacing
This commit is contained in:
17
matrix.py
17
matrix.py
@@ -134,15 +134,18 @@ 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, 5x8 font) ===
|
# === HDD Temps (top-right, 3 rows of 2) ===
|
||||||
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) >= 2:
|
||||||
row1 = " ".join(temps[:3])
|
row1 = " ".join(temps[:2])
|
||||||
graphics.DrawText(canvas, data_font, 26, 8, hdd_color, row1)
|
graphics.DrawText(canvas, small_font, 28, 6, hdd_color, row1)
|
||||||
if len(temps) > 3:
|
if len(temps) >= 4:
|
||||||
row2 = " ".join(temps[3:6])
|
row2 = " ".join(temps[2:4])
|
||||||
graphics.DrawText(canvas, data_font, 26, 18, hdd_color, row2)
|
graphics.DrawText(canvas, small_font, 28, 12, hdd_color, row2)
|
||||||
|
if len(temps) > 4:
|
||||||
|
row3 = " ".join(temps[4:6])
|
||||||
|
graphics.DrawText(canvas, small_font, 28, 18, hdd_color, row3)
|
||||||
|
|
||||||
# === Clock (centered vertically, y=38) ===
|
# === Clock (centered vertically, y=38) ===
|
||||||
time_x = (64 - len(time_str) * 7) // 2
|
time_x = (64 - len(time_str) * 7) // 2
|
||||||
|
|||||||
Reference in New Issue
Block a user