Changes
This commit is contained in:
14
display.py
14
display.py
@@ -20,7 +20,6 @@ Framebuffer prerequisites on Debian (device):
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import math
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
@@ -215,15 +214,15 @@ def main() -> None:
|
||||
pygame.display.set_caption('JARVIS')
|
||||
|
||||
fonts = {
|
||||
'large': _load_font(76),
|
||||
'small': _load_font(24),
|
||||
'large': _load_font(56),
|
||||
'small': _load_font(18),
|
||||
}
|
||||
|
||||
# Layout anchors — all relative to screen size so they adapt to resolution
|
||||
face_rx = int(min(W, H) * 0.115) # half-width at cheek level
|
||||
face_ry = int(min(W, H) * 0.135) # half-height crown→chin
|
||||
face_cx = W // 2
|
||||
face_cy = int(H * 0.31)
|
||||
face_rx = int(min(W, H) * 0.150) # half-width at cheek level
|
||||
face_ry = int(min(W, H) * 0.175) # half-height crown→chin
|
||||
face_cy = int(face_ry * 1.2) + 8 # nearly touches the top edge
|
||||
status_y = int(H * 0.82)
|
||||
dot_y = int(H * 0.895)
|
||||
|
||||
@@ -269,7 +268,8 @@ def main() -> None:
|
||||
special_flags=pygame.BLEND_ADD)
|
||||
else:
|
||||
draw_wireframe_face(screen, face_cx, face_cy, face_rx, face_ry)
|
||||
draw_clock(screen, fonts, 20, 14)
|
||||
clock_block_h = fonts['small'].get_height() + 4 + fonts['large'].get_height()
|
||||
draw_clock(screen, fonts, 20, face_cy - clock_block_h // 2)
|
||||
draw_status(screen, fonts, status_text, W // 2, status_y)
|
||||
draw_dot(screen, W // 2, dot_y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user