Skip to content

Commit 19f8719

Browse files
Merge pull request #72 from ActivityWatch/dev/less-blurry-trayicon
fix: Make trayicon less blurry when being fractionally scaled
2 parents 493eb94 + cbdbca3 commit 19f8719

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aw_qt/trayicon.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ def run(manager: Manager, testing: bool = False) -> Any:
208208
# Ensure cleanup happens on SIGTERM
209209
signal.signal(signal.SIGTERM, lambda *args: exit(manager))
210210

211+
# Allow pixmaps (e.g. trayicon) to use higher DPI images to make icons less
212+
# blurry when fractional scaling is used
213+
app.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)
214+
211215
timer = QtCore.QTimer()
212216
timer.start(100) # You may change this if you wish.
213217
timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms.

0 commit comments

Comments
 (0)