修复qss

修复UID为空没有检测问题
This commit is contained in:
JackLee_CN 2024-11-05 13:41:18 +08:00
parent a23a5cba7a
commit 5692966430
5 changed files with 34 additions and 12 deletions

View File

@ -8,10 +8,22 @@ QPushButton#ico_button{
image:url(:/res/img/xsteam.png); image:url(:/res/img/xsteam.png);
border:none; border:none;
} }
QLabel{ QLabel{
color:#F2F2F2; color:#F2F2F2;
} }
QPushButton{
height:25px;
}
QComboBox{
height:25px;
}
QPushButton:hover{
padding-left:1px;
padding-top:1px;
}
QPushButton#BTN_DOWNLOAD{ QPushButton#BTN_DOWNLOAD{
width:25px; width:25px;
height:25px; height:25px;
@ -33,11 +45,6 @@ QPushButton#BTN_ABOUT{
image:url(":/res/img/btn/btn_about.png"); image:url(":/res/img/btn/btn_about.png");
} }
QPushButton:hover{
padding-left:1px;
padding-top:1px;
}
QGroupBox { QGroupBox {
color: #F2F2F2; color: #F2F2F2;
} }

View File

@ -13,6 +13,12 @@ QLabel{
color:#404040; color:#404040;
} }
QPushButton{
height:25px;
}
QComboBox{
height:25px;
}
QPushButton:hover{ QPushButton:hover{
padding-left:1px; padding-left:1px;
padding-top:1px; padding-top:1px;

View File

@ -8,20 +8,24 @@ sui_sys_style::~sui_sys_style()
} }
void sui_sys_style::slots_sys_style_thread() void sui_sys_style::slots_sys_style_thread()
{ {
//获取系统注册表信息
QSettings style_set(QSettings::UserScope, "Microsoft", "Windows\\CurrentVersion\\Themes\\Personalize");
//当前系统主题状态,默认0-深色主题,1-浅色主题 //当前系统主题状态,默认0-深色主题,1-浅色主题
bool isDark=style_set.value("AppsUseLightTheme").toBool(); Qt::ColorScheme cDark=QGuiApplication::styleHints()->colorScheme();
while (true) while (true)
{ {
//跟随功能是否开启,0-关闭,1-开启 采用bool类型 //跟随功能是否开启,0-关闭,1-开启 采用bool类型
if (state==1) if (state==1)
{ {
//判断当前临时isDark状态是否和系统主题一致&不一致则更新当前软件主题 //判断当前临时isDark状态是否和系统主题一致&不一致则更新当前软件主题
if (isDark != style_set.value("AppsUseLightTheme").toBool()) if (cDark != QGuiApplication::styleHints()->colorScheme())
{ {
emit signals_sys_style_change(style_set.value("AppsUseLightTheme").toInt()); int style;
isDark = style_set.value("AppsUseLightTheme").toBool(); if(QGuiApplication::styleHints()->colorScheme()==Qt::ColorScheme::Light){
style=1;
}else if(QGuiApplication::styleHints()->colorScheme()==Qt::ColorScheme::Dark){
style=0;
}
emit signals_sys_style_change(style);
cDark = QGuiApplication::styleHints()->colorScheme();
} }
} }
//刷新间隔5秒 //刷新间隔5秒

View File

@ -4,7 +4,8 @@
#include<QObject> #include<QObject>
#include<QThread> #include<QThread>
#include<QSettings> #include<QSettings>
#include<QGuiApplication>
#include<QStyleHints>
class sui_sys_style:public QObject class sui_sys_style:public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -255,6 +255,10 @@ void xsteam_ui::slots_get_uid_dlcs()
UidData uid_data; UidData uid_data;
uid_data.uid = ip_uid_edit->text().toStdString(); uid_data.uid = ip_uid_edit->text().toStdString();
uid_data.s_name = server_txt->currentText().toStdString(); uid_data.s_name = server_txt->currentText().toStdString();
if(uid_data.uid!=""){
slots_msg_text("UID不能为空");
return;
}
slots_msg_text("获取DLC信息..."); slots_msg_text("获取DLC信息...");
ip_all_dlc_table->item_clear(); ip_all_dlc_table->item_clear();
ip_in_dlc_table->item_clear(); ip_in_dlc_table->item_clear();