feat: 适配分支机构版本界面样式

This commit is contained in:
2026-01-22 11:23:15 +08:00
parent bc329679a0
commit 81fc433690
2 changed files with 13 additions and 33 deletions

View File

@@ -107,7 +107,7 @@ class TimerApp(QWidget):
def __init__(self):
super().__init__()
self.config = {
'duration': 300,
'duration': 240,
'alarm_offset': 30,
'stay_on_top': True,
'opacity': 1.0,
@@ -129,19 +129,19 @@ class TimerApp(QWidget):
self.setAttribute(Qt.WA_TranslucentBackground)
self.setStyleSheet("""
QWidget#MainFrame {
background-color: #2c3e50;
background-color: #e8f4f8;
border-radius: 15px;
border: 2px solid #34495e;
border: 2px solid #b0d4e3;
}
QLabel { color: #ecf0f1; font-family: 'Segoe UI', Arial; }
QLabel { color: #2c3e50; font-family: 'Segoe UI', Arial; }
QPushButton {
background-color: #3498db;
background-color: #5dade2;
color: white;
border-radius: 5px;
padding: 8px;
font-weight: bold;
}
QPushButton:hover { background-color: #2980b9; }
QPushButton:hover { background-color: #3498db; }
""")
self.main_layout = QVBoxLayout(self)
@@ -168,16 +168,13 @@ class TimerApp(QWidget):
# 按钮区域
self.btn_area = QWidget()
self.btn_layout = QHBoxLayout(self.btn_area)
self.btn_5m = QPushButton("5分钟")
self.btn_6m = QPushButton("6分钟")
self.btn_4m = QPushButton("4分钟")
self.btn_other = QPushButton("其它")
self.btn_5m.clicked.connect(lambda: self.start_countdown(300))
self.btn_6m.clicked.connect(lambda: self.start_countdown(360))
self.btn_4m.clicked.connect(lambda: self.start_countdown(240))
self.btn_other.clicked.connect(self.open_config)
self.btn_layout.addWidget(self.btn_5m)
self.btn_layout.addWidget(self.btn_6m)
self.btn_layout.addWidget(self.btn_4m)
self.btn_layout.addWidget(self.btn_other)
self.content_layout.addWidget(self.btn_area)
@@ -301,7 +298,7 @@ class TimerApp(QWidget):
if hasattr(self, 'color_anim') and self.color_anim is not None:
self.color_anim.stop()
self.label_time.setStyleSheet("color: #ecf0f1;")
self.label_time.setStyleSheet("color: #2c3e50;")
self.is_running = True