Skip to content
Snippets Groups Projects
Commit 3310859d authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Fix HiDPI issues

parent 145d725b
No related branches found
No related tags found
1 merge request!436Fix HiDPI issues
Pipeline #104084 passed
...@@ -979,6 +979,7 @@ def start_editor(sfg: Optional[SFG] = None) -> Dict[str, SFG]: ...@@ -979,6 +979,7 @@ def start_editor(sfg: Optional[SFG] = None) -> Dict[str, SFG]:
All SFGs currently in the editor. All SFGs currently in the editor.
""" """
if not QApplication.instance(): if not QApplication.instance():
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = QApplication(sys.argv) app = QApplication(sys.argv)
else: else:
app = QApplication.instance() app = QApplication.instance()
......
...@@ -251,6 +251,7 @@ def start_simulation_dialog( ...@@ -251,6 +251,7 @@ def start_simulation_dialog(
The name of the SFG. The name of the SFG.
""" """
if not QApplication.instance(): if not QApplication.instance():
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = QApplication(sys.argv) app = QApplication(sys.argv)
else: else:
app = QApplication.instance() app = QApplication.instance()
......
...@@ -1021,6 +1021,7 @@ def start_scheduler(schedule: Optional[Schedule] = None) -> Schedule: ...@@ -1021,6 +1021,7 @@ def start_scheduler(schedule: Optional[Schedule] = None) -> Schedule:
The edited schedule. The edited schedule.
""" """
if not QApplication.instance(): if not QApplication.instance():
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = QApplication(sys.argv) app = QApplication(sys.argv)
else: else:
app = QApplication.instance() app = QApplication.instance()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment