修复样式错误
修复字体错误 修复设置设置
This commit is contained in:
parent
ab1edfecdf
commit
9246ca7fb6
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 |
@ -8,7 +8,7 @@ QPushButton#ico_button{
|
|||||||
image:url(:/res/img/xsteam.png);
|
image:url(:/res/img/xsteam.png);
|
||||||
border:none;
|
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;
|
color:#F2F2F2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ QPushButton#ico_button{
|
|||||||
border:none;
|
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;
|
color:#404040;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,15 +60,7 @@ sui_title::sui_title(QWidget *parent)
|
|||||||
m_layout->setContentsMargins(5, 0, 5, 0);
|
m_layout->setContentsMargins(5, 0, 5, 0);
|
||||||
setFixedHeight(40);
|
setFixedHeight(40);
|
||||||
setLayout(m_layout);
|
setLayout(m_layout);
|
||||||
QFontDatabase database;
|
set_font_style();
|
||||||
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();
|
connect_slots();
|
||||||
}
|
}
|
||||||
sui_title::~sui_title()
|
sui_title::~sui_title()
|
||||||
@ -142,6 +134,10 @@ void sui_title::slots_ico_menu()
|
|||||||
delete m_menu;
|
delete m_menu;
|
||||||
m_menu = nullptr;
|
m_menu = nullptr;
|
||||||
}
|
}
|
||||||
|
void sui_title::set_font_style(){
|
||||||
|
slots_set_style_change();
|
||||||
|
slots_set_font_change();
|
||||||
|
}
|
||||||
void sui_title::slots_set_style_change()
|
void sui_title::slots_set_style_change()
|
||||||
{
|
{
|
||||||
if (sender() != nullptr)
|
if (sender() != nullptr)
|
||||||
|
@ -32,6 +32,7 @@ public:
|
|||||||
~sui_title();
|
~sui_title();
|
||||||
void set_title(QString str);
|
void set_title(QString str);
|
||||||
void set_type(QD_TYPE _type);
|
void set_type(QD_TYPE _type);
|
||||||
|
void set_font_style();
|
||||||
protected:
|
protected:
|
||||||
//双击标题栏进行界面的最大化/还原
|
//双击标题栏进行界面的最大化/还原
|
||||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||||
@ -44,7 +45,7 @@ private:
|
|||||||
void change_style(int);
|
void change_style(int);
|
||||||
void connect_slots();
|
void connect_slots();
|
||||||
private:
|
private:
|
||||||
QWidget *m_parent;
|
QWidget *m_parent;
|
||||||
QHBoxLayout *m_layout;
|
QHBoxLayout *m_layout;
|
||||||
QPushButton *m_icon_button; //标题栏图标
|
QPushButton *m_icon_button; //标题栏图标
|
||||||
QLabel *m_title_label; //标题栏标题
|
QLabel *m_title_label; //标题栏标题
|
||||||
@ -55,9 +56,7 @@ private:
|
|||||||
QMenu* m_menu;
|
QMenu* m_menu;
|
||||||
QMenu* s_menu;
|
QMenu* s_menu;
|
||||||
QMenu* f_menu;
|
QMenu* f_menu;
|
||||||
QStringList style_table;
|
QD_TYPE m_type;
|
||||||
QStringList font_table;
|
|
||||||
QD_TYPE m_type;
|
|
||||||
public slots:
|
public slots:
|
||||||
void slots_ico_menu();
|
void slots_ico_menu();
|
||||||
void slots_set_style_change();
|
void slots_set_style_change();
|
||||||
|
@ -103,4 +103,7 @@ extern QStringList ex_default_src_name;
|
|||||||
|
|
||||||
extern QStringList ex_default_src_url;
|
extern QStringList ex_default_src_url;
|
||||||
|
|
||||||
|
extern QStringList font_table;
|
||||||
|
|
||||||
|
extern QStringList style_table;
|
||||||
#endif
|
#endif
|
@ -29,6 +29,10 @@ QStringList ex_default_src_url = {QStringLiteral("https://github.com/ikun0014/Ma
|
|||||||
QStringLiteral("https://githubfast.com/ManifestHub/ManifestHub.git"),
|
QStringLiteral("https://githubfast.com/ManifestHub/ManifestHub.git"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QStringList font_table;
|
||||||
|
|
||||||
|
QStringList style_table;
|
||||||
|
|
||||||
GloablData _data;
|
GloablData _data;
|
||||||
|
|
||||||
#endif // STEAM_BASE_EX_H
|
#endif // STEAM_BASE_EX_H
|
@ -20,6 +20,13 @@ void xsteam_init_opts()
|
|||||||
xsteam_branch_tag_data_read(x.src_name);
|
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)
|
void xsteam_vdf_free_dir_file(UidData u_data)
|
||||||
{
|
{
|
||||||
|
@ -495,6 +495,7 @@ void xsteam_ui::slots_open_server_edit()
|
|||||||
xs_src_edit_ui->setMaximumSize(660, 580);
|
xs_src_edit_ui->setMaximumSize(660, 580);
|
||||||
xs_src_edit_ui->setGeometry(geometry());
|
xs_src_edit_ui->setGeometry(geometry());
|
||||||
connect(xs_src_edit_ui, SIGNAL(signals_update()), this, SLOT(slots_server_combobox_load_data()));
|
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();
|
xs_src_edit_ui->exec();
|
||||||
}
|
}
|
||||||
void xsteam_ui::slots_open_update()
|
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 = xsteam_update_ui::Instance();
|
||||||
xs_update_ui->setMaximumSize(440, 580);
|
xs_update_ui->setMaximumSize(440, 580);
|
||||||
xs_update_ui->setGeometry(geometry());
|
xs_update_ui->setGeometry(geometry());
|
||||||
|
xs_update_ui->title()->set_font_style();
|
||||||
xs_update_ui->exec();
|
xs_update_ui->exec();
|
||||||
}
|
}
|
||||||
void xsteam_ui::slots_open_setting()
|
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 = xsteam_set_ui::Instance();
|
||||||
xs_sets_ui->setMaximumSize(660, 580);
|
xs_sets_ui->setMaximumSize(660, 580);
|
||||||
xs_sets_ui->setGeometry(geometry());
|
xs_sets_ui->setGeometry(geometry());
|
||||||
|
xs_sets_ui->title()->set_font_style();
|
||||||
xs_sets_ui->exec();
|
xs_sets_ui->exec();
|
||||||
}
|
}
|
||||||
void xsteam_ui::slots_open_about()
|
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 = xsteam_about_ui::Instance();
|
||||||
xs_about_ui->setMaximumSize(440, 580);
|
xs_about_ui->setMaximumSize(440, 580);
|
||||||
xs_about_ui->setGeometry(geometry());
|
xs_about_ui->setGeometry(geometry());
|
||||||
|
xs_about_ui->title()->set_font_style();
|
||||||
xs_about_ui->exec();
|
xs_about_ui->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user