adjustments to formatting of odds

This commit is contained in:
Chuck
2025-07-21 15:43:22 -05:00
parent 94f0eb060b
commit 06fa6d656a
9 changed files with 76 additions and 75 deletions

View File

@@ -729,12 +729,12 @@ class BaseSoccerManager:
# Choose color and position based on which team has the spread
if odds.get('spread', {}).get('team') == game['home_abbr']:
text_color = (255, 100, 100) # Reddish
spread_x = self.display_width - draw.textlength(spread_text, font=self.fonts['status']) - 2
spread_x = self.display_width - draw.textlength(spread_text, font=self.fonts['status'])
else:
text_color = (100, 255, 100) # Greenish
spread_x = 2
spread_x = 0
spread_y = self.display_height - 8
spread_y = 0
self._draw_text_with_outline(draw, spread_text, (spread_x, spread_y), self.fonts['status'], fill=text_color)
# Draw records if enabled
@@ -749,16 +749,16 @@ class BaseSoccerManager:
record_bbox = draw.textbbox((0,0), "0-0", font=record_font)
record_height = record_bbox[3] - record_bbox[1]
record_y = self.display_height - record_height - 1
record_y = self.display_height - record_height
if away_record:
away_record_x = 2
away_record_x = 0
self._draw_text_with_outline(draw, away_record, (away_record_x, record_y), record_font)
if home_record:
home_record_bbox = draw.textbbox((0,0), home_record, font=record_font)
home_record_width = home_record_bbox[2] - home_record_bbox[0]
home_record_x = self.display_width - home_record_width - 2
home_record_x = self.display_width - home_record_width
self._draw_text_with_outline(draw, home_record, (home_record_x, record_y), record_font)
# --- Display Image ---