|
|
|
|
@ -203,44 +203,45 @@ class WeatherFloatingWidget(QDialog):
|
|
|
|
|
colors = theme_manager.get_current_theme_colors()
|
|
|
|
|
|
|
|
|
|
if is_dark:
|
|
|
|
|
# 深色主题样式
|
|
|
|
|
# 深色主题样式 - 与每日谏言悬浮窗口保持一致
|
|
|
|
|
self.main_frame.setStyleSheet(f"""
|
|
|
|
|
QFrame#mainFrame {{
|
|
|
|
|
background-color: {colors['surface']};
|
|
|
|
|
border: 1px solid {colors['border']};
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
|
|
|
}}
|
|
|
|
|
QLabel {{
|
|
|
|
|
color: {colors['text']};
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
padding: 3px 5px; // 适度增加padding使布局更舒适
|
|
|
|
|
margin: 1px;
|
|
|
|
|
padding: 4px 6px;
|
|
|
|
|
margin: 2px;
|
|
|
|
|
}}
|
|
|
|
|
QLabel#temperatureLabel {{
|
|
|
|
|
color: {colors['accent']};
|
|
|
|
|
font-size: 19px; // 适度增大字体大小
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding: 5px 7px; // 适度增加padding使布局更舒适
|
|
|
|
|
margin: 2px;
|
|
|
|
|
padding: 6px 8px;
|
|
|
|
|
margin: 3px;
|
|
|
|
|
}}
|
|
|
|
|
QLabel#cityLabel {{
|
|
|
|
|
color: {colors['text_secondary']};
|
|
|
|
|
font-size: 12px; // 适度增大字体大小
|
|
|
|
|
padding: 3px 5px; // 适度增加padding使布局更舒适
|
|
|
|
|
margin: 1px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
padding: 4px 6px;
|
|
|
|
|
margin: 2px;
|
|
|
|
|
}}
|
|
|
|
|
QLabel#weatherDescLabel {{
|
|
|
|
|
color: {colors['text']};
|
|
|
|
|
font-size: 12px; // 适度增大字体大小
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
padding: 3px 5px; // 适度增加padding使布局更舒适
|
|
|
|
|
margin: 1px;
|
|
|
|
|
padding: 4px 6px;
|
|
|
|
|
margin: 2px;
|
|
|
|
|
}}
|
|
|
|
|
QLabel#detailLabel {{
|
|
|
|
|
color: {colors['text_secondary']};
|
|
|
|
|
font-size: 11px; // 适度增大字体大小
|
|
|
|
|
padding: 3px 5px; // 适度增加padding使布局更舒适
|
|
|
|
|
margin: 1px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
padding: 4px 6px;
|
|
|
|
|
margin: 2px;
|
|
|
|
|
}}
|
|
|
|
|
QFrame#separator {{
|
|
|
|
|
background-color: {colors['border']};
|
|
|
|
|
@ -263,9 +264,9 @@ class WeatherFloatingWidget(QDialog):
|
|
|
|
|
background-color: {colors['accent']};
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 6px; // 适度增加圆角
|
|
|
|
|
padding: 5px 14px; // 适度增加padding使按钮更舒适
|
|
|
|
|
font-size: 11px; // 适度增大字体大小
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 6px 16px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}}
|
|
|
|
|
QPushButton#refreshButton:hover, QPushButton#detailButton:hover {{
|
|
|
|
|
@ -275,28 +276,28 @@ class WeatherFloatingWidget(QDialog):
|
|
|
|
|
background-color: {colors['surface']};
|
|
|
|
|
color: {colors['text']};
|
|
|
|
|
border: 1px solid {colors['border']};
|
|
|
|
|
border-radius: 6px; // 适度增加圆角
|
|
|
|
|
padding: 4px 7px; // 适度增加padding使布局更舒适
|
|
|
|
|
font-size: 11px; // 适度增大字体大小
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 4px 7px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
min-height: 24px; // 适度增加最小高度使布局更舒适
|
|
|
|
|
min-height: 24px;
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo:hover {{
|
|
|
|
|
border-color: {colors['accent']};
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo::drop-down {{
|
|
|
|
|
border: none;
|
|
|
|
|
width: 14px; // 适度增加宽度
|
|
|
|
|
width: 14px;
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo::down-arrow {{
|
|
|
|
|
image: none;
|
|
|
|
|
border-left: 2px solid transparent;
|
|
|
|
|
border-right: 2px solid transparent;
|
|
|
|
|
border-top: 5px solid {colors['text']}; // 适度增加箭头大小
|
|
|
|
|
border-top: 5px solid {colors['text']};
|
|
|
|
|
}}
|
|
|
|
|
""")
|
|
|
|
|
else:
|
|
|
|
|
# 浅色主题样式
|
|
|
|
|
# 浅色主题样式 - 与每日谏言悬浮窗口保持一致
|
|
|
|
|
self.main_frame.setStyleSheet(f"""
|
|
|
|
|
QFrame#mainFrame {{
|
|
|
|
|
background-color: {colors['surface']};
|
|
|
|
|
@ -357,9 +358,9 @@ class WeatherFloatingWidget(QDialog):
|
|
|
|
|
background-color: {colors['accent']};
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 6px; // 适度增加圆角
|
|
|
|
|
padding: 5px 14px; // 适度增加padding使按钮更舒适
|
|
|
|
|
font-size: 11px; // 适度增大字体大小
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 6px 16px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}}
|
|
|
|
|
QPushButton#refreshButton:hover, QPushButton#detailButton:hover {{
|
|
|
|
|
@ -369,24 +370,24 @@ class WeatherFloatingWidget(QDialog):
|
|
|
|
|
background-color: {colors['surface']};
|
|
|
|
|
color: {colors['text']};
|
|
|
|
|
border: 1px solid {colors['border']};
|
|
|
|
|
border-radius: 6px; // 适度增加圆角
|
|
|
|
|
padding: 4px 7px; // 适度增加padding使布局更舒适
|
|
|
|
|
font-size: 11px; // 适度增大字体大小
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: 4px 7px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
min-height: 24px; // 适度增加最小高度使布局更舒适
|
|
|
|
|
min-height: 24px;
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo:hover {{
|
|
|
|
|
border-color: {colors['accent']};
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo::drop-down {{
|
|
|
|
|
border: none;
|
|
|
|
|
width: 14px; // 适度增加宽度
|
|
|
|
|
width: 14px;
|
|
|
|
|
}}
|
|
|
|
|
QComboBox#cityCombo::down-arrow {{
|
|
|
|
|
image: none;
|
|
|
|
|
border-left: 2px solid transparent;
|
|
|
|
|
border-right: 2px solid transparent;
|
|
|
|
|
border-top: 5px solid {colors['text']}; // 适度增加箭头大小
|
|
|
|
|
border-top: 5px solid {colors['text']};
|
|
|
|
|
}}
|
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
|