调整ico图片为jpg,使得更加直观

This commit is contained in:
JackLee_CN 2024-10-18 11:51:21 +08:00
parent c5213e6804
commit c7b6c87d61
4 changed files with 5 additions and 5 deletions

View File

@ -82,8 +82,8 @@ bool xsteam_curl::get_steam_header_ico(std::string logo_url,std::string _c_uid)
{ {
std::string base_str=QDir::currentPath().toStdString(); std::string base_str=QDir::currentPath().toStdString();
QDir dir(QString::fromStdString(base_str + "/save/img")); QDir dir(QString::fromStdString(base_str + "/save/img"));
std::string u_str = logo_url + _c_uid + "/logo.png"; std::string u_str = logo_url + _c_uid + "/header.jpg";
std::string s_str = base_str + "/save/img/" + _c_uid + ".png"; std::string s_str = base_str + "/save/img/" + _c_uid + ".jpg";
if(!dir.exists()){ if(!dir.exists()){
QDir().mkpath(QString::fromStdString(base_str + "/save/img")); QDir().mkpath(QString::fromStdString(base_str + "/save/img"));
} }

View File

@ -112,7 +112,7 @@ void xsteam_git_fetch::fecth_uid_to_steam(UidData &u_data)
{ {
free_git_fetch(); free_git_fetch();
} }
u_data.ico = u_data.uid + ".png"; u_data.ico = u_data.uid + ".jpg";
// lua to luapaker .st to steamtools dir // lua to luapaker .st to steamtools dir
emit signal_fetch_return_msg("生成游戏入库lua脚本..."); emit signal_fetch_return_msg("生成游戏入库lua脚本...");
if (xsteam_lua_to_com(u_data)) if (xsteam_lua_to_com(u_data))

View File

@ -34,6 +34,7 @@ void xsteam_view::init_view(VIEW_MODE view_mode)
setSelectionBehavior(QAbstractItemView::SelectRows); setSelectionBehavior(QAbstractItemView::SelectRows);
setEditTriggers(QAbstractItemView::NoEditTriggers); setEditTriggers(QAbstractItemView::NoEditTriggers);
verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); // 自动设置行高 verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); // 自动设置行高
setFocusPolicy(Qt::NoFocus);
verticalHeader()->hide(); verticalHeader()->hide();
setModel(m_model); setModel(m_model);
} }

View File

@ -27,8 +27,7 @@ void xsteam_view_item::paint(QPainter *painter,
} }
QRect rect = option.rect; QRect rect = option.rect;
pic = pic.scaled(rect.width(), rect.height(), pic = pic.scaled(rect.width(), rect.height(),Qt::KeepAspectRatio);
Qt::KeepAspectRatio);
int width = pic.width(); int width = pic.width();
int height = pic.height(); int height = pic.height();