From 61e73c6278e52feba21c3e2750c484eb4521b2a3 Mon Sep 17 00:00:00 2001 From: Lyubomir Ternavskiy <127299159+LyubomirT@users.noreply.github.com> Date: Fri, 26 Jul 2024 20:42:26 +0300 Subject: [PATCH] make it work on other OSes --- ui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui.py b/ui.py index bd5ad18..b378f79 100644 --- a/ui.py +++ b/ui.py @@ -2,6 +2,7 @@ import ctypes import json import os +import sys class Ui_MainWindow(object): def setupUi(self, MainWindow): @@ -10,7 +11,8 @@ def setupUi(self, MainWindow): MainWindow.setMinimumSize(QtCore.QSize(600, 400)) MainWindow.setMaximumSize(QtCore.QSize(600, 400)) MainWindow.setWindowIcon(QtGui.QIcon("logo.png")) - ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("Chainsaw Human Typing") + if sys.platform == "win32": + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("Chainsaw Human Typing") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget")