diff --git a/leads_gui/config.py b/leads_gui/config.py index 1fdfd053..739fc3ca 100644 --- a/leads_gui/config.py +++ b/leads_gui/config.py @@ -11,10 +11,10 @@ def __init__(self, base: dict[str, _Any]) -> None: self.no_title_bar: bool = False self.manual_mode: bool = False self.refresh_rate: int = 30 - self.w_font_size_small: int = 14 - self.w_font_size_medium: int = 24 - self.w_font_size_large: int = 40 - self.w_font_size_x_large: int = 56 + self.font_size_small: int = 14 + self.font_size_medium: int = 24 + self.font_size_large: int = 40 + self.font_size_x_large: int = 56 self.comm_addr: str = "127.0.0.1" self.comm_port: int = 16900 self.data_dir: str = "data" diff --git a/leads_gui/icons.py b/leads_gui/icons.py index 65d6e61a..a305f91b 100644 --- a/leads_gui/icons.py +++ b/leads_gui/icons.py @@ -25,7 +25,7 @@ def load_source(self, color: Color) -> _Image: def __call__(self, size: int | None = None, color: Color | None = None) -> _CTkImage: if size is None: - size = _require_config().w_font_size_medium + size = _require_config().font_size_medium return _CTkImage(self.load_source(color if color else Color.BLACK), None if color else self.load_source(Color.WHITE), size=(size, size)) diff --git a/leads_vec/cli.py b/leads_vec/cli.py index b174d881..7e7873b8 100644 --- a/leads_vec/cli.py +++ b/leads_vec/cli.py @@ -53,27 +53,27 @@ def switch_m3_mode(): manager.rd().m3_mode = (manager.rd().m3_mode + 1) % 3 manager["m1"] = CTkButton(manager.root(), textvariable=m1, command=switch_m1_mode, - font=("Arial", cfg.w_font_size_small)) + font=("Arial", cfg.font_size_small)) manager["m2"] = CTkButton(manager.root(), textvariable=m2, state="disabled", - font=("Arial", cfg.w_font_size_x_large)) + font=("Arial", cfg.font_size_x_large)) manager["m3"] = CTkButton(manager.root(), textvariable=m3, command=switch_m3_mode, - font=("Arial", cfg.w_font_size_medium)) + font=("Arial", cfg.font_size_medium)) manager["comm_status"] = CTkLabel(manager.root(), text="COMM OFFLINE", text_color="gray", - font=("Arial", cfg.w_font_size_small)) + font=("Arial", cfg.font_size_small)) i = 0 for system in SystemLiteral: i += 1 system_lower = system.lower() manager[system_lower + "_status"] = CTkLabel(manager.root(), text=system + " READY", text_color="green", - font=("Arial", cfg.w_font_size_small)) + font=("Arial", cfg.font_size_small)) add_hotkey(str(i), switch := make_system_switch(ctx, SystemLiteral(system), manager.rd())) manager[system_lower] = CTkButton(manager.root(), text=system + " ON", command=switch, - font=("Arial", cfg.w_font_size_small)) + font=("Arial", cfg.font_size_small)) manager["time_lap"] = CTkButton(manager.root(), text="Time Lap", command=ctx.time_lap, - font=("Arial", cfg.w_font_size_small)) + font=("Arial", cfg.font_size_small)) def hazard(): ctx.hazard(not ctx.hazard()) @@ -88,8 +88,7 @@ def switch_ecs_mode(mode): manager.rd().control_system_switch_changed = True manager["ecs"] = CTkSegmentedButton(manager.root(), values=["STANDARD", "AGGRESSIVE", "SPORT", "OFF"], - variable=ecs, command=switch_ecs_mode, - font=("Arial", cfg.w_font_size_small)) + variable=ecs, command=switch_ecs_mode, font=("Arial", cfg.font_size_small)) uim = initialize(window, render, ctx, get_controller(MAIN_CONTROLLER))