From 34a0a5f7f246725e499c823de09525a5d4f58267 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Tue, 20 Oct 2026 17:42:21 -0700 Subject: [PATCH] Migrating to pyside6 1: removing winmica (not supported with pyside) --- app.py | 20 -------------------- requirements.txt | 1 - 2 files changed, 21 deletions(-) diff --git a/app.py b/app.py index ce5fa53..9f4ebd3 100644 --- a/app.py +++ b/app.py @@ -10,9 +10,6 @@ import pyperclip import hashlib import platform -if platform.system() == "Windows": - from winmica import EnableMica, BackdropType, is_mica_supported - MAC_SAVE_KEY = ( b"\x69\x70\x75\x39\x54\x55\x76\x35\x34\x79\x76\x5d\x69\x73\x46\x4d" b"\x68\x35\x40\x3b\x74\x2e\x35\x77\x33\x34\x45\x32\x52\x79\x40\x7b" @@ -98,7 +95,6 @@ class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("GDUtils") - self.apply_mica(self) titleLabel = QLabel("GDUtils") font = QFont() @@ -185,12 +181,6 @@ class MainWindow(QMainWindow): container.setLayout(layout) self.setCentralWidget(container) - def apply_mica(self, widget): - if platform.system() == "Windows" and is_mica_supported(): - widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground, True) - hwnd = int(widget.winId()) - EnableMica(hwnd, BackdropType.MICA) - def on_save_decode_click(self): file_path, _ = QFileDialog.getOpenFileName( self, @@ -252,7 +242,6 @@ class MainWindow(QMainWindow): dialog = QInputDialog(self) dialog.setWindowTitle("Level decoder") dialog.setLabelText("Enter the level data to decode:") - self.apply_mica(dialog) ok = dialog.exec() data = dialog.textValue() if ok and data: @@ -260,14 +249,12 @@ class MainWindow(QMainWindow): msg = QMessageBox() msg.setWindowTitle("Level decoder") msg.setText("The decoded level data has been copied to your clipboard") - self.apply_mica(msg) msg.exec() def on_level_encode_click(self): dialog = QInputDialog(self) dialog.setWindowTitle("Level encoder") dialog.setLabelText("Enter the level data to encode:") - self.apply_mica(dialog) ok = dialog.exec() data = dialog.textValue() if ok and data: @@ -275,7 +262,6 @@ class MainWindow(QMainWindow): msg = QMessageBox() msg.setWindowTitle("Level encoder") msg.setText("The encoded level data has been copied to your clipboard") - self.apply_mica(msg) msg.exec() def on_convert_to_gdlvl_click(self): @@ -332,7 +318,6 @@ class MainWindow(QMainWindow): dialog = QInputDialog(self) dialog.setWindowTitle("GJP decoder") dialog.setLabelText("Enter the GJP to decode:") - self.apply_mica(dialog) ok = dialog.exec() data = dialog.textValue() if ok and data: @@ -340,14 +325,12 @@ class MainWindow(QMainWindow): msg = QMessageBox() msg.setWindowTitle("GJP decoder") msg.setText("The decoded GJP has been copied to your clipboard") - self.apply_mica(msg) msg.exec() def on_gjp_encode_click(self): dialog = QInputDialog(self) dialog.setWindowTitle("GJP encoder") dialog.setLabelText("Enter the password to encode:") - self.apply_mica(dialog) ok = dialog.exec() data = dialog.textValue() if ok and data: @@ -355,14 +338,12 @@ class MainWindow(QMainWindow): msg = QMessageBox() msg.setWindowTitle("GJP encoder") msg.setText("The encoded GJP has been copied to your clipboard") - self.apply_mica(msg) msg.exec() def on_gjp2_encode_click(self): dialog = QInputDialog(self) dialog.setWindowTitle("GJP2 encoder") dialog.setLabelText("Enter the password to encode:") - self.apply_mica(dialog) ok = dialog.exec() data = dialog.textValue() if ok and data: @@ -370,7 +351,6 @@ class MainWindow(QMainWindow): msg = QMessageBox() msg.setWindowTitle("GJP2 encoder") msg.setText("The encoded GJP2 has been copied to your clipboard") - self.apply_mica(msg) msg.exec() app = QApplication(sys.argv) diff --git a/requirements.txt b/requirements.txt index e44d756..1e05991 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ PyQt6 pycryptodome pyperclip -winmica ; sys_platform == 'win32'