新增功能:
- 设置弹窗标题下固定显示当前版本号(config.json 的 version)
This commit is contained in:
+7
-1
@@ -1415,7 +1415,7 @@ class SettingsDialog(QDialog):
|
|||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.setWindowTitle("设置")
|
self.setWindowTitle("设置")
|
||||||
self.setWindowIcon(load_icon())
|
self.setWindowIcon(load_icon())
|
||||||
self.setFixedSize(300, 290)
|
self.setFixedSize(300, 316)
|
||||||
self.setStyleSheet(f"""
|
self.setStyleSheet(f"""
|
||||||
QDialog {{ background-color: {C_BG}; }}
|
QDialog {{ background-color: {C_BG}; }}
|
||||||
QLabel {{ color: {C_TEXT}; font-family: "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 12px; }}
|
QLabel {{ color: {C_TEXT}; font-family: "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 12px; }}
|
||||||
@@ -1438,6 +1438,12 @@ class SettingsDialog(QDialog):
|
|||||||
title.setAlignment(Qt.AlignCenter)
|
title.setAlignment(Qt.AlignCenter)
|
||||||
layout.addWidget(title)
|
layout.addWidget(title)
|
||||||
|
|
||||||
|
# 版本号:标题下固定显示
|
||||||
|
ver_lab = QLabel(f"版本号: {VERSION}")
|
||||||
|
ver_lab.setStyleSheet(f"color: {C_SUBTEXT}; font-size: 11px;")
|
||||||
|
ver_lab.setAlignment(Qt.AlignCenter)
|
||||||
|
layout.addWidget(ver_lab)
|
||||||
|
|
||||||
# 提示语:标题正下方(保存结果/错误也显示在这行)
|
# 提示语:标题正下方(保存结果/错误也显示在这行)
|
||||||
self.lb_hint = QLabel("代理运行中,关闭代理后可修改" if port_locked else "保存更改后下次开启代理生效")
|
self.lb_hint = QLabel("代理运行中,关闭代理后可修改" if port_locked else "保存更改后下次开启代理生效")
|
||||||
self.lb_hint.setStyleSheet(f"color: {C_SUBTEXT}; font-size: 11px;")
|
self.lb_hint.setStyleSheet(f"color: {C_SUBTEXT}; font-size: 11px;")
|
||||||
|
|||||||
Reference in New Issue
Block a user