From fa879267c0e24cd644c329ab651e85ac6edc32c1 Mon Sep 17 00:00:00 2001 From: Hector van der Aa Date: Wed, 6 May 2026 16:10:10 +0200 Subject: [PATCH] Fixed font scaling on HiDPI monitors --- src/dataflux/app.py | 2 +- src/dataflux/telemetry_common | 2 +- src/dataflux/ui/windows.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dataflux/app.py b/src/dataflux/app.py index b2162dc..eca9cc5 100644 --- a/src/dataflux/app.py +++ b/src/dataflux/app.py @@ -28,7 +28,7 @@ def run() -> None: # Add Inter font to registry and bind as main app font with dpg.font_registry(): - app_font = dpg.add_font("./Inter-Regular.ttf", 18) + app_font = dpg.add_font("./Inter-Regular.ttf", 18*2) dpg.bind_font(app_font) dataflux.ui.windows.build_windows(state) diff --git a/src/dataflux/telemetry_common b/src/dataflux/telemetry_common index edc567c..af57f8a 120000 --- a/src/dataflux/telemetry_common +++ b/src/dataflux/telemetry_common @@ -1 +1 @@ -/home/hector/projects/Exergie/TelemetryCommon/python/ \ No newline at end of file +/Users/hector/Projects/Exergie/TelemetryCommon/python \ No newline at end of file diff --git a/src/dataflux/ui/windows.py b/src/dataflux/ui/windows.py index 96b0bc4..5c29330 100644 --- a/src/dataflux/ui/windows.py +++ b/src/dataflux/ui/windows.py @@ -22,6 +22,7 @@ def _add_live_data_row(label: str, value: str, tag: str, units: str) -> None: def build_windows(state: AppState) -> None: with dpg.window(label='DataFlux',tag="main_window", no_collapse=True): + dpg.set_global_font_scale(0.5) with dpg.menu_bar(): with dpg.menu(label='File'): dpg.add_menu_item(label="Connect", enabled=True, tag=MENU_FILE_CONNECT, callback=dataflux.callbacks.menu.open_connection_window)