See if this fixes issues w other platforms

This commit is contained in:
Lncvrt committed 2026-08-23 13:33:11 -07:00
1 parent 036a6d61bd
commit 98f1c6631a
1 file changed
+5 -2
+5 -2
View File
@@ -8,7 +8,10 @@ import gzip
import zlib import zlib
import pyperclip import pyperclip
import hashlib import hashlib
from winmica import EnableMica, BackdropType, is_mica_supported import platform
if platform.system() == "Windows":
from winmica import EnableMica, BackdropType, is_mica_supported
MAC_SAVE_KEY = ( MAC_SAVE_KEY = (
b"\x69\x70\x75\x39\x54\x55\x76\x35\x34\x79\x76\x5d\x69\x73\x46\x4d" b"\x69\x70\x75\x39\x54\x55\x76\x35\x34\x79\x76\x5d\x69\x73\x46\x4d"
@@ -168,7 +171,7 @@ class MainWindow(QMainWindow):
self.setCentralWidget(container) self.setCentralWidget(container)
def apply_mica(self, widget): def apply_mica(self, widget):
if is_mica_supported(): if platform.system() == "Windows" and is_mica_supported():
widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground, True) widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground, True)
hwnd = int(widget.winId()) hwnd = int(widget.winId())
EnableMica(hwnd, BackdropType.MICA) EnableMica(hwnd, BackdropType.MICA)