Skip to content

Commit ef8e1c6

Browse files
committed
feat(usage popups): Make font size usage more consistent
Uses 150% scaling on all usage popups fonts
1 parent 1f8f34e commit ef8e1c6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def _display_component_editor_usage_instructions(self, parent: tk.Tk) -> None:
308308
height=6,
309309
bd=0,
310310
background=style.lookup("TLabel", "background"),
311-
font=create_scaled_font(get_safe_font_config(), 1.2),
311+
font=create_scaled_font(get_safe_font_config(), 1.5),
312312
)
313313
# pylint: enable=duplicate-code
314314
instructions_text.insert(tk.END, _("1. Describe the properties of the vehicle components in the window below.\n"))
@@ -552,9 +552,9 @@ def _confirm_component_properties(self) -> bool:
552552
validation_popup_window = BaseWindow(cast("tk.Tk", self.root))
553553
style = ttk.Style()
554554

555-
# Create a 20% larger font
555+
# Create a 50% larger font
556556
font_config = get_safe_font_config()
557-
larger_font = create_scaled_font(font_config, 1.2)
557+
larger_font = create_scaled_font(font_config, 1.5)
558558

559559
confirmation_text = RichText(
560560
validation_popup_window.main_frame,

ardupilot_methodic_configurator/frontend_tkinter_rich_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RichText(tk.Text): # pylint: disable=too-many-ancestors
4747
def __init__(self, *args, **kwargs) -> None:
4848
super().__init__(*args, **kwargs)
4949

50-
default_font = safe_font_nametofont()
50+
default_font = kwargs.get("font", None) or safe_font_nametofont()
5151
if default_font:
5252
# Use the actual font configuration if available
5353
bold_font = tkFont.Font(**default_font.configure()) # type: ignore[arg-type]

ardupilot_methodic_configurator/frontend_tkinter_usage_popup_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def display_workflow_explanation(parent: Optional[tk.Tk] = None) -> BaseWindow:
192192
height=1,
193193
bd=0,
194194
background=ttk.Style(popup_window.root).lookup("TLabel", "background"),
195-
font=create_scaled_font(get_safe_font_config(), 1.2),
195+
font=create_scaled_font(get_safe_font_config(), 1.5),
196196
)
197197
instructions.insert(tk.END, _("This is not a ground control station and it has a different workflow:"))
198198
UsagePopupWindow.setup_window(
@@ -219,7 +219,7 @@ def display_workflow_explanation(parent: Optional[tk.Tk] = None) -> BaseWindow:
219219
height=1,
220220
bd=0,
221221
background=ttk.Style(popup_window.root).lookup("TLabel", "background"),
222-
font=create_scaled_font(get_safe_font_config(), 1.2),
222+
font=create_scaled_font(get_safe_font_config(), 1.5),
223223
)
224224
rich_text.insert(tk.END, _("see "))
225225
rich_text.insert_clickable_link(

0 commit comments

Comments
 (0)