Fixed font scaling on HiDPI monitors
This commit is contained in:
@@ -28,7 +28,7 @@ def run() -> None:
|
|||||||
|
|
||||||
# Add Inter font to registry and bind as main app font
|
# Add Inter font to registry and bind as main app font
|
||||||
with dpg.font_registry():
|
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)
|
dpg.bind_font(app_font)
|
||||||
|
|
||||||
dataflux.ui.windows.build_windows(state)
|
dataflux.ui.windows.build_windows(state)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
/home/hector/projects/Exergie/TelemetryCommon/python/
|
/Users/hector/Projects/Exergie/TelemetryCommon/python
|
||||||
@@ -22,6 +22,7 @@ def _add_live_data_row(label: str, value: str, tag: str, units: str) -> None:
|
|||||||
def build_windows(state: AppState) -> None:
|
def build_windows(state: AppState) -> None:
|
||||||
|
|
||||||
with dpg.window(label='DataFlux',tag="main_window", no_collapse=True):
|
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_bar():
|
||||||
with dpg.menu(label='File'):
|
with dpg.menu(label='File'):
|
||||||
dpg.add_menu_item(label="Connect", enabled=True, tag=MENU_FILE_CONNECT, callback=dataflux.callbacks.menu.open_connection_window)
|
dpg.add_menu_item(label="Connect", enabled=True, tag=MENU_FILE_CONNECT, callback=dataflux.callbacks.menu.open_connection_window)
|
||||||
|
|||||||
Reference in New Issue
Block a user