From 069429be717c4cd2c384b538082cb143417f0835 Mon Sep 17 00:00:00 2001
From: KenanZhu <3471685733@qq.com>
Date: Tue, 9 Dec 2025 08:19:25 +0800
Subject: [PATCH] refactor(ALAboutDialog): replace hide/show methods with
'exec()' for dialog modal handling
---
src/gui/ALAboutDialog.py | 20 +++++------
src/gui/ALAboutDialog.ui | 77 +++++++++++++++++++++++++++++-----------
src/gui/ALMainWindow.py | 6 ++--
3 files changed, 68 insertions(+), 35 deletions(-)
diff --git a/src/gui/ALAboutDialog.py b/src/gui/ALAboutDialog.py
index 7a52e94..391bd89 100644
--- a/src/gui/ALAboutDialog.py
+++ b/src/gui/ALAboutDialog.py
@@ -30,7 +30,7 @@ class ALAboutDialog(QDialog, Ui_ALAboutDialog):
def __init__(
self,
- parent=None
+ parent = None
):
super().__init__(parent)
@@ -67,21 +67,21 @@ Version: {AL_VERSION}
Python version: {platform.python_version()}
Qt version: {self.getQtVersion()}
-
Author Information:
-Developer: KenanZhu
-Contact: nanoki_zh@163.com
-GitHub: https://www.github.com/KenanZhu
+System Information:
+Processor: {platform.processor()}
+Operating system: {os_info['system']}
+System version: {os_info['version']}
+System architecture: {os_info['architecture']}
Project Information:
License: MIT License
Project repository: https://www.github.com/KenanZhu/AutoLibrary
Project website: https://www.autolibrary.cv/
-System Information:
-Processor: {platform.processor()}
-Operating system: {os_info['system']}
-System version: {os_info['version']}
-System architecture: {os_info['architecture']}
+Author Information:
+Developer: KenanZhu
+Contact: nanoki_zh@163.com
+GitHub: https://www.github.com/KenanZhu
"""
return about_text
diff --git a/src/gui/ALAboutDialog.ui b/src/gui/ALAboutDialog.ui
index 74b2b9c..d030e9d 100644
--- a/src/gui/ALAboutDialog.ui
+++ b/src/gui/ALAboutDialog.ui
@@ -6,25 +6,28 @@
0
0
- 300
- 300
+ 400
+ 400
- 300
- 300
+ 400
+ 400
800
- 300
+ 400
关于 - AutoLibrary
+
+ false
+
5
@@ -96,23 +99,55 @@
-
-
-
-
- Courier New
- false
-
+
+
+ 0
-
- QTextEdit::LineWrapMode::NoWrap
-
-
- true
-
-
- Qt::TextInteractionFlag::TextBrowserInteraction
-
-
+
-
+
+
+
+ 56
+ 0
+
+
+
+
+ 56
+ 16777215
+
+
+
+ QFrame::Shape::NoFrame
+
+
+ QFrame::Shadow::Plain
+
+
+ 0
+
+
+
+ -
+
+
+
+ Courier New
+ false
+
+
+
+ QTextEdit::LineWrapMode::NoWrap
+
+
+ true
+
+
+ Qt::TextInteractionFlag::TextBrowserInteraction
+
+
+
+
-
diff --git a/src/gui/ALMainWindow.py b/src/gui/ALMainWindow.py
index 27fa1ca..e861556 100644
--- a/src/gui/ALMainWindow.py
+++ b/src/gui/ALMainWindow.py
@@ -58,7 +58,6 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
}
self.__alTimerTaskWidget = None
self.__alConfigWidget = None
- self.__alAboutDialog = None
self.__auto_lib_thread = None
self.__current_timer_task_thread = None
self.__is_running_timer_task = False
@@ -85,9 +84,8 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
self
):
- if self.__alAboutDialog is None:
- self.__alAboutDialog = ALAboutDialog(self)
- self.__alAboutDialog.show()
+ about_dialog = ALAboutDialog(self)
+ about_dialog.exec()
def onManualActionTriggered(