Update
This commit is contained in:
parent
fdd0d92035
commit
a6ffb3f3bd
@ -72,7 +72,6 @@ class InstallDialog(QtWidgets.QDialog):
|
|||||||
with open(data.TOOL_STYLE_FILE, 'r', encoding='utf-8') as f:
|
with open(data.TOOL_STYLE_FILE, 'r', encoding='utf-8') as f:
|
||||||
style = f.read()
|
style = f.read()
|
||||||
self.setStyleSheet(style)
|
self.setStyleSheet(style)
|
||||||
print(f"已加载样式文件: {data.TOOL_STYLE_FILE}")
|
|
||||||
|
|
||||||
def setup_ui(self):
|
def setup_ui(self):
|
||||||
"""Initialize and setup UI components"""
|
"""Initialize and setup UI components"""
|
||||||
@ -389,7 +388,7 @@ except ImportError as e:
|
|||||||
|
|
||||||
def _show_uninstall_success_message(self):
|
def _show_uninstall_success_message(self):
|
||||||
"""Show uninstallation success message"""
|
"""Show uninstallation success message"""
|
||||||
msg_box = QtWidgets.QMessageBox()
|
msg_box = QtWidgets.QMessageBox(self)
|
||||||
msg_box.setWindowTitle("Uninstallation Successful")
|
msg_box.setWindowTitle("Uninstallation Successful")
|
||||||
msg_box.setText(f"{data.TOOL_NAME} has been successfully uninstalled!")
|
msg_box.setText(f"{data.TOOL_NAME} has been successfully uninstalled!")
|
||||||
msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
||||||
@ -398,7 +397,7 @@ except ImportError as e:
|
|||||||
msg_box.exec_()
|
msg_box.exec_()
|
||||||
|
|
||||||
def _show_install_success_message(self):
|
def _show_install_success_message(self):
|
||||||
msg_box = QtWidgets.QMessageBox()
|
msg_box = QtWidgets.QMessageBox(self)
|
||||||
msg_box.setWindowTitle("Installation Successful")
|
msg_box.setWindowTitle("Installation Successful")
|
||||||
msg_box.setText(f"{data.TOOL_NAME} has been successfully installed!")
|
msg_box.setText(f"{data.TOOL_NAME} has been successfully installed!")
|
||||||
msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
/* 全局 QPushButton 样式 */
|
/* 全局 QPushButton 样式 */
|
||||||
QPushButton {
|
QPushButton {
|
||||||
background-color: #D0D0D0;
|
background-color: #2A2A2A;
|
||||||
color: #303030;
|
color: #CCCCCC;
|
||||||
border-radius: 10px;
|
border-radius: 3px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
|
border: 1px solid #444444;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:hover {
|
QPushButton:hover {
|
||||||
background-color: #E0E0E0;
|
background-color: #3A3A3A;
|
||||||
|
border-color: #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:pressed {
|
QPushButton:pressed {
|
||||||
background-color: #C0C0C0;
|
background-color: #1A1A1A;
|
||||||
|
border-color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton:disabled {
|
QPushButton:disabled {
|
||||||
@ -24,20 +27,23 @@ QPushButton:disabled {
|
|||||||
|
|
||||||
/* 单独的消息按钮样式(可选) */
|
/* 单独的消息按钮样式(可选) */
|
||||||
QPushButton.message-button {
|
QPushButton.message-button {
|
||||||
background-color: #B0B0B0;
|
background-color: #404040;
|
||||||
color: #303030;
|
color: #CCCCCC;
|
||||||
border-radius: 10px;
|
border-radius: 3px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
|
border: 1px solid #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton.message-button:hover {
|
QPushButton.message-button:hover {
|
||||||
background-color: #C0C0C0;
|
background-color: #505050;
|
||||||
|
border-color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton.message-button:pressed {
|
QPushButton.message-button:pressed {
|
||||||
background-color: #A0A0A0;
|
background-color: #303030;
|
||||||
|
border-color: #444444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MetaFusion 深色主题样式 */
|
/* MetaFusion 深色主题样式 */
|
||||||
@ -174,15 +180,25 @@ QComboBox::down-arrow {
|
|||||||
|
|
||||||
/* 滚动条样式 */
|
/* 滚动条样式 */
|
||||||
QScrollBar:vertical {
|
QScrollBar:vertical {
|
||||||
background: #2A2A2A;
|
background: #373737;
|
||||||
width: 10px;
|
width: 16px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:vertical {
|
QScrollBar::handle:vertical {
|
||||||
background: #444444;
|
background: #4b5cc4;
|
||||||
min-height: 20px;
|
min-height: 16px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::handle:vertical:hover {
|
||||||
|
background: #5b6cd4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::handle:vertical:pressed {
|
||||||
|
background: #3b4cb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||||||
@ -190,15 +206,25 @@ QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar:horizontal {
|
QScrollBar:horizontal {
|
||||||
background: #2A2A2A;
|
background: #373737;
|
||||||
height: 10px;
|
height: 16px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:horizontal {
|
QScrollBar::handle:horizontal {
|
||||||
background: #444444;
|
background: #4b5cc4;
|
||||||
min-width: 20px;
|
min-width: 16px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::handle:horizontal:hover {
|
||||||
|
background: #5b6cd4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::handle:horizontal:pressed {
|
||||||
|
background: #3b4cb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
||||||
@ -284,3 +310,30 @@ QDialog {
|
|||||||
QLabel {
|
QLabel {
|
||||||
color: #E0E0E0;
|
color: #E0E0E0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 基础按钮样式 - 用于安装界面 */
|
||||||
|
.InstallDialog QPushButton,
|
||||||
|
.InstallDialog QMessageBox QPushButton {
|
||||||
|
background-color: #D0D0D0;
|
||||||
|
color: #303030;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.InstallDialog QPushButton:hover,
|
||||||
|
.InstallDialog QMessageBox QPushButton:hover {
|
||||||
|
background-color: #E0E0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.InstallDialog QPushButton:pressed,
|
||||||
|
.InstallDialog QMessageBox QPushButton:pressed {
|
||||||
|
background-color: #C0C0C0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 安装界面消息框样式 */
|
||||||
|
.InstallDialog QMessageBox {
|
||||||
|
background-color: #404040;
|
||||||
|
color: #E0E0E0;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user