Update infi.systray fork

From https://github.com/JonnyWong16/infi.systray.git@develop
This commit is contained in:
JonnyWong16 2021-10-15 18:55:53 -07:00
parent 94ef9b30c7
commit c01b4da33d
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
4 changed files with 5 additions and 3 deletions

1
lib/infi/__init__.py Normal file
View file

@ -0,0 +1 @@
__import__("pkg_resources").declare_namespace(__name__)

View file

@ -174,9 +174,10 @@ class SysTrayIcon(object):
# Try and find a custom icon # Try and find a custom icon
hicon = 0 hicon = 0
if self._icon is not None and os.path.isfile(self._icon): if self._icon is not None and os.path.isfile(self._icon):
icon_flags = LR_LOADFROMFILE | LR_DEFAULTSIZE ico_x = GetSystemMetrics(SM_CXSMICON)
ico_y = GetSystemMetrics(SM_CYSMICON)
icon = encode_for_locale(self._icon) icon = encode_for_locale(self._icon)
hicon = self._hicon = LoadImage(0, icon, IMAGE_ICON, 0, 0, icon_flags) hicon = self._hicon = LoadImage(0, icon, IMAGE_ICON, ico_x, ico_y, LR_LOADFROMFILE)
self._icon_shared = False self._icon_shared = False
# Can't find icon file - using default shared icon # Can't find icon file - using default shared icon

View file

@ -42,8 +42,8 @@ NIM_DELETE = 2
NIF_ICON = 2 NIF_ICON = 2
NIF_MESSAGE = 1 NIF_MESSAGE = 1
NIF_TIP = 4 NIF_TIP = 4
MIIM_STATE = 1
MIIM_ID = 2 MIIM_ID = 2
MIIM_STATE = 1
MIIM_SUBMENU = 4 MIIM_SUBMENU = 4
MIIM_STRING = 64 MIIM_STRING = 64
MIIM_BITMAP = 128 MIIM_BITMAP = 128