Skip to content

Commit

Permalink
Change: Set EnableHighDpiScaling flag for high DPI support
Browse files Browse the repository at this point in the history
This is handled at the OS layer by OSX and at the server layer by Wayland, whereas X11 and Windows place the responsibility of scaling on the app. Qt includes a flag to enable high-dpi support trivially, though it causes the app to be unwieldly large.

Fixes reilleya#101
  • Loading branch information
quigleyj97 committed Jul 20, 2019
1 parent 84dc366 commit dff7e95
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import sys
import app
from app import App
from PyQt5.QtCore import Qt

app = app.App(sys.argv)
# must be set before the app is constructed
# cf. https://doc.qt.io/qt-5/highdpi.html
# and https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtcore/qt.html#ApplicationAttribute
App.setAttribute(Qt.AA_EnableHighDpiScaling)

app = App(sys.argv)
sys.exit(app.exec())

0 comments on commit dff7e95

Please sign in to comment.