Skip to content

Commit

Permalink
Merge pull request #72 from ActivityWatch/dev/less-blurry-trayicon
Browse files Browse the repository at this point in the history
fix: Make trayicon less blurry when being fractionally scaled
  • Loading branch information
johan-bjareholt committed Feb 21, 2021
2 parents 493eb94 + cbdbca3 commit 19f8719
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aw_qt/trayicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ def run(manager: Manager, testing: bool = False) -> Any:
# Ensure cleanup happens on SIGTERM
signal.signal(signal.SIGTERM, lambda *args: exit(manager))

# Allow pixmaps (e.g. trayicon) to use higher DPI images to make icons less
# blurry when fractional scaling is used
app.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)

timer = QtCore.QTimer()
timer.start(100) # You may change this if you wish.
timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms.
Expand Down

0 comments on commit 19f8719

Please sign in to comment.