Skip to content

Commit 77b4bfe

Browse files
committed
System tray now supports dark theme
1 parent a4e7488 commit 77b4bfe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gui_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ctypes
12
from typing import Callable, Any
23

34
import PySimpleGUI as sg
@@ -48,6 +49,10 @@ def init_theme():
4849
titlebar_font=("Tahoma", 12),
4950
icon=app_abs_path("img/inversion_manager.png"),
5051
)
52+
# Tell Windows that this is dark theme app
53+
# So.. use dark menus, like dark system tray etc.
54+
# More info here: https://gist.github.com/rounk-ctrl/b04e5622e30e0d62956870d5c22b7017
55+
ctypes.windll['uxtheme.dll'][135](1)
5156

5257

5358
def get_title(title: str):

0 commit comments

Comments
 (0)