Skip to content

Commit d14cb74

Browse files
Merge pull request #96 from labscript-suite/high-dipi
Set some Qt settings to play nicer on High DPI displays
2 parents fb122b3 + d07618a commit d14cb74

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

labscript_utils/splash.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
Qt = QtCore.Qt
3030

3131

32+
# Set auto high-DPI scaling - this ensures pixel metrics are scaled
33+
# appropriately so that we don't get a weird mix of large fonts and small
34+
# everything else on High DPI displays:
35+
QtWidgets.QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
36+
# Use high res pixmaps if available, instead of rendering at low resolution and
37+
# upscaling:
38+
QtWidgets.QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
39+
40+
3241
class Splash(QtWidgets.QFrame):
3342
w = 250
3443
h = 230

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy