修复样式错误

修复字体错误
修复设置设置
This commit is contained in:
JackLee_CN 2024-10-31 12:58:14 +08:00
parent ab1edfecdf
commit 9246ca7fb6
10 changed files with 29 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -8,7 +8,7 @@ QPushButton#ico_button{
image:url(:/res/img/xsteam.png);
border:none;
}
QLabel#HEAD_STR,QLabel#SRC_SERVER,QLabel#GAME_UID,QLabel#VERSION_TIPS,QLabel#STATE_TIPS,QLabel#VERSION_TIPS_TXT,QLabel#INFO{
QLabel{
color:#F2F2F2;
}

View File

@ -13,7 +13,7 @@ QPushButton#ico_button{
border:none;
}
QLabel#HEAD_STR,QLabel#SRC_SERVER,QLabel#GAME_UID,QLabel#VERSION_TIPS,QLabel#STATE_TIPS,QLabel#VERSION_TIPS_TXT,QLabel#INFO{
QLabel{
color:#404040;
}

View File

@ -60,16 +60,8 @@ sui_title::sui_title(QWidget *parent)
m_layout->setContentsMargins(5, 0, 5, 0);
setFixedHeight(40);
setLayout(m_layout);
QFontDatabase database;
foreach (const QString &family, database.families(QFontDatabase::SimplifiedChinese))
{
font_table.append(family);
}
QDir *styleDir = new QDir(tr(":/res/qss/"));
style_table = styleDir->entryList(QDir::Files);
slots_set_style_change();
slots_set_font_change();
connect_slots();
set_font_style();
connect_slots();
}
sui_title::~sui_title()
{
@ -142,6 +134,10 @@ void sui_title::slots_ico_menu()
delete m_menu;
m_menu = nullptr;
}
void sui_title::set_font_style(){
slots_set_style_change();
slots_set_font_change();
}
void sui_title::slots_set_style_change()
{
if (sender() != nullptr)

View File

@ -32,6 +32,7 @@ public:
~sui_title();
void set_title(QString str);
void set_type(QD_TYPE _type);
void set_font_style();
protected:
//双击标题栏进行界面的最大化/还原
void mouseDoubleClickEvent(QMouseEvent *event);
@ -44,7 +45,7 @@ private:
void change_style(int);
void connect_slots();
private:
QWidget *m_parent;
QWidget *m_parent;
QHBoxLayout *m_layout;
QPushButton *m_icon_button; //标题栏图标
QLabel *m_title_label; //标题栏标题
@ -55,9 +56,7 @@ private:
QMenu* m_menu;
QMenu* s_menu;
QMenu* f_menu;
QStringList style_table;
QStringList font_table;
QD_TYPE m_type;
QD_TYPE m_type;
public slots:
void slots_ico_menu();
void slots_set_style_change();

View File

@ -103,4 +103,7 @@ extern QStringList ex_default_src_name;
extern QStringList ex_default_src_url;
extern QStringList font_table;
extern QStringList style_table;
#endif

View File

@ -29,6 +29,10 @@ QStringList ex_default_src_url = {QStringLiteral("https://github.com/ikun0014/Ma
QStringLiteral("https://githubfast.com/ManifestHub/ManifestHub.git"),
};
QStringList font_table;
QStringList style_table;
GloablData _data;
#endif // STEAM_BASE_EX_H

View File

@ -20,6 +20,13 @@ void xsteam_init_opts()
xsteam_branch_tag_data_read(x.src_name);
}
}
QFontDatabase database;
foreach (const QString &family, database.families(QFontDatabase::SimplifiedChinese))
{
font_table.append(family);
}
QDir *styleDir = new QDir(":/res/qss/");
style_table = styleDir->entryList(QDir::Files);
}
void xsteam_vdf_free_dir_file(UidData u_data)
{

View File

@ -495,6 +495,7 @@ void xsteam_ui::slots_open_server_edit()
xs_src_edit_ui->setMaximumSize(660, 580);
xs_src_edit_ui->setGeometry(geometry());
connect(xs_src_edit_ui, SIGNAL(signals_update()), this, SLOT(slots_server_combobox_load_data()));
xs_src_edit_ui->title()->set_font_style();
xs_src_edit_ui->exec();
}
void xsteam_ui::slots_open_update()
@ -502,6 +503,7 @@ void xsteam_ui::slots_open_update()
xs_update_ui = xsteam_update_ui::Instance();
xs_update_ui->setMaximumSize(440, 580);
xs_update_ui->setGeometry(geometry());
xs_update_ui->title()->set_font_style();
xs_update_ui->exec();
}
void xsteam_ui::slots_open_setting()
@ -509,6 +511,7 @@ void xsteam_ui::slots_open_setting()
xs_sets_ui = xsteam_set_ui::Instance();
xs_sets_ui->setMaximumSize(660, 580);
xs_sets_ui->setGeometry(geometry());
xs_sets_ui->title()->set_font_style();
xs_sets_ui->exec();
}
void xsteam_ui::slots_open_about()
@ -516,6 +519,7 @@ void xsteam_ui::slots_open_about()
xs_about_ui = xsteam_about_ui::Instance();
xs_about_ui->setMaximumSize(440, 580);
xs_about_ui->setGeometry(geometry());
xs_about_ui->title()->set_font_style();
xs_about_ui->exec();
}