diff --git a/res/img/xsteam.ico b/res/img/xsteam.ico index e120887..5607e9c 100644 Binary files a/res/img/xsteam.ico and b/res/img/xsteam.ico differ diff --git a/res/img/xsteam.png b/res/img/xsteam.png index ebfa522..703806e 100644 Binary files a/res/img/xsteam.png and b/res/img/xsteam.png differ diff --git a/res/qss/dark_style.qss b/res/qss/dark_style.qss index 3d3f41e..e4eaa02 100644 --- a/res/qss/dark_style.qss +++ b/res/qss/dark_style.qss @@ -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; } diff --git a/res/qss/light_style.qss b/res/qss/light_style.qss index 1d36780..9a6797c 100644 --- a/res/qss/light_style.qss +++ b/res/qss/light_style.qss @@ -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; } diff --git a/src/sui_title.cpp b/src/sui_title.cpp index ae0af85..c9589b8 100644 --- a/src/sui_title.cpp +++ b/src/sui_title.cpp @@ -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) diff --git a/src/sui_title.h b/src/sui_title.h index 4f77d7f..5724f9d 100644 --- a/src/sui_title.h +++ b/src/sui_title.h @@ -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(); diff --git a/src/xsteam_base.h b/src/xsteam_base.h index f23397a..f414395 100644 --- a/src/xsteam_base.h +++ b/src/xsteam_base.h @@ -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 \ No newline at end of file diff --git a/src/xsteam_base_ex.h b/src/xsteam_base_ex.h index 0294cbb..6b0b135 100644 --- a/src/xsteam_base_ex.h +++ b/src/xsteam_base_ex.h @@ -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 \ No newline at end of file diff --git a/src/xsteam_ex.cpp b/src/xsteam_ex.cpp index e3220c5..f086c69 100644 --- a/src/xsteam_ex.cpp +++ b/src/xsteam_ex.cpp @@ -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) { diff --git a/src/xsteam_ui.cpp b/src/xsteam_ui.cpp index 4952e7b..718d8ff 100644 --- a/src/xsteam_ui.cpp +++ b/src/xsteam_ui.cpp @@ -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(); }