33from dataclasses import dataclass
44from enum import Enum
55from typing import Any
6- from openpilot .system .ui .lib .application import gui_app , FontWeight , FONT_SCALE
6+ from openpilot .system .ui .lib .application import gui_app , FontWeight
77from openpilot .system .ui .lib .scroll_panel import GuiScrollPanel
88from openpilot .system .ui .lib .wrap_text import wrap_text
99from openpilot .system .ui .widgets import Widget
@@ -176,8 +176,8 @@ def _render(self, rect: rl.Rectangle):
176176 wrapped_lines = wrap_text (font , element .content , element .font_size , int (content_width ))
177177
178178 for line in wrapped_lines :
179- if current_y < rect .y - element .font_size * FONT_SCALE :
180- current_y += element .font_size * FONT_SCALE * element .line_height
179+ if current_y < rect .y - element .font_size :
180+ current_y += element .font_size * element .line_height
181181 continue
182182
183183 if current_y > rect .y + rect .height :
@@ -186,7 +186,7 @@ def _render(self, rect: rl.Rectangle):
186186 text_x = rect .x + (max (element .indent_level - 1 , 0 ) * LIST_INDENT_PX )
187187 rl .draw_text_ex (font , line , rl .Vector2 (text_x + padding , current_y ), element .font_size , 0 , self ._text_color )
188188
189- current_y += element .font_size * FONT_SCALE * element .line_height
189+ current_y += element .font_size * element .line_height
190190
191191 # Apply bottom margin
192192 current_y += element .margin_bottom
@@ -210,7 +210,7 @@ def get_total_height(self, content_width: int) -> float:
210210 wrapped_lines = wrap_text (font , element .content , element .font_size , int (usable_width ))
211211
212212 for _ in wrapped_lines :
213- total_height += element .font_size * FONT_SCALE * element .line_height
213+ total_height += element .font_size * element .line_height
214214
215215 total_height += element .margin_bottom
216216
0 commit comments