From b71d44d30bb01c93de4730800f61a88f3bf918e6 Mon Sep 17 00:00:00 2001 From: Levi Rizki Saputra <42236775+levirs565@users.noreply.github.com> Date: Tue, 12 Jan 2021 16:57:17 +0700 Subject: [PATCH 1/2] fix guiscrcpy use python generic icon in windows taskbar --- guiscrcpy/cli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guiscrcpy/cli.py b/guiscrcpy/cli.py index 257ff339..78b5cce6 100644 --- a/guiscrcpy/cli.py +++ b/guiscrcpy/cli.py @@ -133,6 +133,13 @@ def cli( # it will log the traceback to the terminal # but it would not be visible to users without CLI interface # enable High DPI scaling + + if platform.system() == "Windows": + import ctypes + + appid = "srevinsaju.guiscrcpy" + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid) + QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True) # use HIGH DPI icons QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True) From 11390f6c7a57648e16a27c5cfde3b270598bed0b Mon Sep 17 00:00:00 2001 From: Srevin Saju Date: Tue, 12 Jan 2021 13:34:58 +0300 Subject: [PATCH 2/2] chore: add an explanatory comment for https://github.com/srevinsaju/guiscrcpy/pull/206/commits/b71d44d30bb01c93de4730800f61a88f3bf918e6 --- guiscrcpy/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guiscrcpy/cli.py b/guiscrcpy/cli.py index 78b5cce6..23b4db58 100644 --- a/guiscrcpy/cli.py +++ b/guiscrcpy/cli.py @@ -136,7 +136,7 @@ def cli( if platform.system() == "Windows": import ctypes - + # https://stackoverflow.com/a/1552105/9986755 appid = "srevinsaju.guiscrcpy" ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid)