Skip to content

Commit

Permalink
Fix fonts scaling with os dpi, even if dpi setting is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
brzGatsu committed Apr 29, 2024
1 parent 82b215f commit 61ba5ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Sephrasto/Sephrasto.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ def close(self): pass
logging.getLogger().setLevel(loglevels[Wolke.Settings['Logging']])

os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "1" if Wolke.Settings['DPI-Skalierung'] else "0"
if Wolke.Settings['DPI-Skalierung']:
os.environ.pop("QT_FONT_DPI", None)
else:
os.environ["QT_FONT_DPI"] = "96"

self.app = QtCore.QCoreApplication.instance()
if self.app is None:
Expand Down

0 comments on commit 61ba5ea

Please sign in to comment.