From 9d86c1224e1160944e64dfd9d4746d0fdf1b68a9 Mon Sep 17 00:00:00 2001 From: ChuckBuilds Date: Thu, 9 Jul 2026 14:53:05 -0400 Subject: [PATCH 1/2] Fix odds-ticker baseball gap and stock-ticker logo spacing odds-ticker: for live baseball games, odds_width was sized from the away/home odds text ("Bases: 1B2B3B", "Count: 3-2" - up to 104px at 8px font) even though that text is never drawn; a 24px bases-diamond graphic is drawn instead, left-aligned in that column. The next column (inning info) started after the full odds_width, leaving up to ~80px of dead space between the bases graphic and the inning text. Detect the live-baseball case before sizing the column and use the actual 24px graphic width instead of maxing against the unused placeholder text. ledmatrix-stocks: logo_x (2px) and logo_gap (4px, between the logo's right edge and the symbol/price text) were too tight for a ~26px-tall logo on a 32px-tall display. Bumped to 4px and 8px. Co-Authored-By: Claude Sonnet 5 --- plugins/ledmatrix-stocks/display_renderer.py | 4 ++-- plugins/odds-ticker/manager.py | 25 ++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/ledmatrix-stocks/display_renderer.py b/plugins/ledmatrix-stocks/display_renderer.py index 38475969..bfe99c1d 100644 --- a/plugins/ledmatrix-stocks/display_renderer.py +++ b/plugins/ledmatrix-stocks/display_renderer.py @@ -182,7 +182,7 @@ def create_stock_display(self, symbol: str, data: Dict[str, Any]) -> Image.Image is_crypto = data.get('is_crypto', False) # Draw large stock/crypto logo on the left - logo_x = 2 # Small margin from left edge (used for logo_right even if logo is missing) + logo_x = 4 # Margin from left edge (used for logo_right even if logo is missing) logo = self._get_stock_logo(symbol, is_crypto) if logo: # Position logo on the left side with minimal spacing - matching old stock_manager @@ -259,7 +259,7 @@ def create_stock_display(self, symbol: str, data: Dict[str, Any]) -> Image.Image # Position text column immediately after the logo's right edge logo_right = int(logo_x + logo.width) if logo else int(logo_x) - logo_gap = 4 # px between logo right edge and text start + logo_gap = 8 # px between logo right edge and text start symbol_width_tmp = int(symbol_bbox[2] - symbol_bbox[0]) price_width_tmp = int(price_bbox[2] - price_bbox[0]) change_width_tmp = int(change_bbox[2] - change_bbox[0]) if change_text else 0 diff --git a/plugins/odds-ticker/manager.py b/plugins/odds-ticker/manager.py index 39b92bc9..ab396e9f 100644 --- a/plugins/odds-ticker/manager.py +++ b/plugins/odds-ticker/manager.py @@ -1991,24 +1991,29 @@ def _create_game_display(self, game: Dict[str, Any]) -> Image.Image: elif over_under: home_odds_text = f"O/U {over_under}" - away_odds_width = int(temp_draw.textlength(away_odds_text, font=odds_font)) - home_odds_width = int(temp_draw.textlength(home_odds_text, font=odds_font)) - odds_width = max(away_odds_width, home_odds_width) - - # For baseball live games, optimize width for graphical bases + # For baseball live games, the odds column draws a small graphical bases + # cluster instead of odds text (see is_baseball_live below) - detect that + # first so we can size the column to the graphic, not to the placeholder + # "Bases: ..." / "Count: ..." text that away_odds_text/home_odds_text hold + # but never actually get drawn. is_baseball_live = False if is_live and live_info and hasattr(self, '_bases_data'): sport = None league_key = game.get('league') if league_key and league_key in self.league_configs: sport = self.league_configs[league_key].get('sport') - if sport == 'baseball': is_baseball_live = True - # Use a more compact width for baseball games to minimize dead space - # The bases graphic only needs about 24px width, so we can be more efficient - min_bases_width = 24 # Reduced from 30 to minimize dead space - odds_width = max(odds_width, min_bases_width) + + if is_baseball_live: + # The bases graphic only needs about 24px width - sizing the column + # to the (unused) placeholder text left a large gap before the next + # column, since that text is much wider than the graphic actually drawn. + odds_width = 24 + else: + away_odds_width = int(temp_draw.textlength(away_odds_text, font=odds_font)) + home_odds_width = int(temp_draw.textlength(home_odds_text, font=odds_font)) + odds_width = max(away_odds_width, home_odds_width) # --- Calculate total width --- # Start with the sum of all visible components and consistent padding From 201e85e9027b989e227dcb25a3c5267eee56cfd1 Mon Sep 17 00:00:00 2001 From: ChuckBuilds Date: Fri, 10 Jul 2026 13:19:44 -0400 Subject: [PATCH 2/2] chore(plugins): bump versions for ledmatrix-stocks and odds-ticker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI's version-bump enforcement failed because this PR's code changes to display_renderer.py and manager.py weren't matched by manifest version bumps. Branch was 5 commits behind main (missing #177's GPL/hasattr-guard work, which had already taken ledmatrix-stocks to 2.3.1) — merged main in first so this bumps from the real current version instead of colliding with an already-published one. - ledmatrix-stocks: 2.3.1 -> 2.3.2 (logo_x/logo_gap spacing fix) - odds-ticker: 1.1.4 -> 1.1.5 (baseball odds-column sizing fix), and dropped its dependencies.managers object — same schema shape as the bug fixed in stock-news (PR #174): manifest_schema.json types `dependencies` as a flat array of pip package names, and nothing in core reads a `managers` key. It was never touched before because CI only validates changed plugins, but editing this manifest for the version bump means the schema check now runs against it for real. New versions[] entries use ledmatrix_min_version (not the deprecated ledmatrix_min flagged by core's store_manager.py validator). plugins.json synced via update_registry.py. --- plugins.json | 8 ++++---- plugins/ledmatrix-stocks/manifest.json | 10 ++++++++-- plugins/odds-ticker/manifest.json | 13 ++++++++----- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/plugins.json b/plugins.json index e3ecabd1..e97db078 100644 --- a/plugins.json +++ b/plugins.json @@ -578,10 +578,10 @@ "plugin_path": "plugins/odds-ticker", "stars": 0, "downloads": 0, - "last_updated": "2026-05-15", + "last_updated": "2026-07-10", "verified": true, "screenshot": "", - "latest_version": "1.1.4" + "latest_version": "1.1.5" }, { "id": "of-the-day", @@ -777,10 +777,10 @@ "plugin_path": "plugins/ledmatrix-stocks", "stars": 0, "downloads": 0, - "last_updated": "2026-07-08", + "last_updated": "2026-07-10", "verified": true, "screenshot": "", - "latest_version": "2.3.1", + "latest_version": "2.3.2", "icon": "fas fa-chart-line" }, { diff --git a/plugins/ledmatrix-stocks/manifest.json b/plugins/ledmatrix-stocks/manifest.json index c14399f9..84c83e9e 100644 --- a/plugins/ledmatrix-stocks/manifest.json +++ b/plugins/ledmatrix-stocks/manifest.json @@ -1,7 +1,7 @@ { "id": "ledmatrix-stocks", "name": "Stock & Crypto Ticker", - "version": "2.3.1", + "version": "2.3.2", "description": "Displays stock tickers with prices, changes, and optional charts for stocks and cryptocurrencies. Supports scroll and switch display modes.", "author": "LEDMatrix Team", "homepage": "https://github.com/ChuckBuilds/ledmatrix-plugins/tree/main/plugins/ledmatrix-stocks", @@ -39,6 +39,12 @@ } ], "versions": [ + { + "released": "2026-07-10", + "version": "2.3.2", + "notes": "Bump logo_x (2px→4px) and logo_gap (4px→8px) so the ~26px-tall logo isn't cramped against the display edge and the symbol/price text on the 32px-tall display.", + "ledmatrix_min_version": "2.0.0" + }, { "released": "2026-07-08", "version": "2.3.1", @@ -81,7 +87,7 @@ "ledmatrix_min_version": "2.0.0" } ], - "last_updated": "2026-07-08", + "last_updated": "2026-07-10", "stars": 0, "downloads": 0, "verified": true, diff --git a/plugins/odds-ticker/manifest.json b/plugins/odds-ticker/manifest.json index 012c1141..e0333f5e 100644 --- a/plugins/odds-ticker/manifest.json +++ b/plugins/odds-ticker/manifest.json @@ -1,7 +1,7 @@ { "id": "odds-ticker", "name": "Odds Ticker", - "version": "1.1.4", + "version": "1.1.5", "description": "Displays scrolling odds and betting lines for upcoming games across multiple sports leagues including NFL, NBA, MLB, NCAA Football, and more", "author": "ChuckBuilds", "category": "sports", @@ -20,6 +20,12 @@ "branch": "main", "plugin_path": "plugins/odds-ticker", "versions": [ + { + "released": "2026-07-10", + "version": "1.1.5", + "notes": "Size the odds column to the actual 24px bases-diamond graphic for live baseball games instead of the unused away/home odds text width (up to 104px), removing up to ~80px of dead space before the inning info column.", + "ledmatrix_min_version": "2.0.0" + }, { "released": "2026-05-15", "version": "1.1.4", @@ -58,16 +64,13 @@ ], "stars": 0, "downloads": 0, - "last_updated": "2026-05-15", + "last_updated": "2026-07-10", "verified": true, "screenshot": "", "display_modes": [ "odds_ticker" ], "class_name": "OddsTickerPlugin", - "dependencies": { - "managers": [] - }, "compatible_versions": [ ">=2.0.0" ],