From 3310859ddd8e523f8fbf11138d0872bdc57b8972 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson <oscar.gustafsson@gmail.com> Date: Thu, 14 Sep 2023 14:20:39 +0200 Subject: [PATCH] Fix HiDPI issues --- b_asic/GUI/main_window.py | 1 + b_asic/gui_utils/plot_window.py | 1 + b_asic/scheduler_gui/main_window.py | 1 + 3 files changed, 3 insertions(+) diff --git a/b_asic/GUI/main_window.py b/b_asic/GUI/main_window.py index 1fa80a41..698621d4 100644 --- a/b_asic/GUI/main_window.py +++ b/b_asic/GUI/main_window.py @@ -979,6 +979,7 @@ def start_editor(sfg: Optional[SFG] = None) -> Dict[str, SFG]: All SFGs currently in the editor. """ if not QApplication.instance(): + QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) else: app = QApplication.instance() diff --git a/b_asic/gui_utils/plot_window.py b/b_asic/gui_utils/plot_window.py index 28602c3f..5322debf 100644 --- a/b_asic/gui_utils/plot_window.py +++ b/b_asic/gui_utils/plot_window.py @@ -251,6 +251,7 @@ def start_simulation_dialog( The name of the SFG. """ if not QApplication.instance(): + QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) else: app = QApplication.instance() diff --git a/b_asic/scheduler_gui/main_window.py b/b_asic/scheduler_gui/main_window.py index 437dc009..d2ef99b6 100644 --- a/b_asic/scheduler_gui/main_window.py +++ b/b_asic/scheduler_gui/main_window.py @@ -1021,6 +1021,7 @@ def start_scheduler(schedule: Optional[Schedule] = None) -> Schedule: The edited schedule. """ if not QApplication.instance(): + QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) else: app = QApplication.instance() -- GitLab