修复:

- 底部两行提示小字均改为左对齐,右侧完全留给设置按钮
- 设置入口改为小按钮:默认透明文字,hover 显示卡片背景+边框(替代原来的下划线样式)
This commit is contained in:
RoyirinRosmontis
2026-08-23 14:13:46 +08:00
parent 4a1d74903d
commit 6c25360f68
+25 -17
View File
@@ -1687,29 +1687,37 @@ class MainWindow(QWidget):
layout.addWidget(self.log_text)
hints = QWidget()
hints_layout = QVBoxLayout(hints)
hints_layout = QHBoxLayout(hints)
hints_layout.setContentsMargins(0, 0, 0, 0)
hints_layout.setSpacing(1)
hints_layout.setSpacing(8)
# 第一行:左对齐警示 + 右对齐"设置"入口
top_row = QHBoxLayout()
top_row.setContentsMargins(0, 0, 0, 0)
# 左侧两行小字(左对齐),右侧完全留给设置按钮
left_col = QVBoxLayout()
left_col.setContentsMargins(0, 0, 0, 0)
left_col.setSpacing(1)
warn_label = QLabel("请勿二次分发此软件!")
warn_label.setStyleSheet(f"color: {C_RED}; font-size: 11px;")
top_row.addWidget(warn_label)
top_row.addStretch()
self.link_settings = NodeLabel(
"设置", tooltip="设置",
base=f"color: {C_SUBTEXT}; font-size: 11px;",
hover=f"color: {C_TEXT}; font-size: 11px; text-decoration: underline;")
self.link_settings.clicked.connect(self._show_settings_dialog)
top_row.addWidget(self.link_settings)
hints_layout.addLayout(top_row)
left_col.addWidget(warn_label)
privacy_label = QLabel("使用此软件将会收集并上报您的 IP 地址及部分设备信息")
privacy_label.setStyleSheet("color: #c8ccd4; font-size: 9px;")
privacy_label.setAlignment(Qt.AlignCenter)
hints_layout.addWidget(privacy_label)
left_col.addWidget(privacy_label)
hints_layout.addLayout(left_col, 1)
self.btn_settings = QPushButton("设置")
self.btn_settings.setCursor(Qt.PointingHandCursor)
self.btn_settings.setStyleSheet(f"""
QPushButton {{
background: transparent; color: {C_SUBTEXT};
border: none; border-radius: 6px;
padding: 3px 10px; font-size: 11px;
}}
QPushButton:hover {{
background-color: {C_CARD}; color: {C_TEXT};
border: 1px solid {C_BORDER};
}}
""")
self.btn_settings.clicked.connect(self._show_settings_dialog)
hints_layout.addWidget(self.btn_settings, 0, Qt.AlignVCenter)
layout.addWidget(hints)