From e7a8103589e6ea24425d5a81c85f49f680018c7e Mon Sep 17 00:00:00 2001 From: Cam Gorrie Date: Thu, 11 Jun 2026 18:03:39 -0400 Subject: [PATCH] fix(uilib/config): qualify method calls in _set_defaults _set_defaults() used bare add_font and add_color names instead of self.add_font / self.add_color. This was latent because the singleton path always returned the existing instance, but constructing a fresh standalone Config() would raise NameError. --- uilib/config.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uilib/config.py b/uilib/config.py index 9a44b0458..489728093 100644 --- a/uilib/config.py +++ b/uilib/config.py @@ -38,17 +38,17 @@ def __init__(self, config_json=None): def _set_defaults(self): if "default" not in self.fonts: - add_font("default", "DejaVuSans.ttf", 16) + self.add_font("default", "DejaVuSans.ttf", 16) if "default_title" not in self.fonts: - add_font("default_title", "DejaVuSans-Bold.ttf", 16) + self.add_font("default_title", "DejaVuSans-Bold.ttf", 16) if "default_fgnd" not in self.colors: - add_color("default_fgnd", (255, 255, 255)) + self.add_color("default_fgnd", (255, 255, 255)) if "default_bkgnd" not in self.colors: - add_color("default_bkgnd", (0, 0, 0)) + self.add_color("default_bkgnd", (0, 0, 0)) if "default_title_fgnd" not in self.colors: - add_color("default_title_fgnd", (255, 191, 63)) + self.add_color("default_title_fgnd", (255, 191, 63)) if "default_title_bkgnd" not in self.colors: - add_color("default_title_bkgnd", (63, 63, 63)) + self.add_color("default_title_bkgnd", (63, 63, 63)) def add_font(self, label, file_name, size): f = ImageFont.truetype(file_name, size)