Project

General

Profile

Bug #831 ยป 0024-Qt-Correct-svgflag-size-on-start-page.patch

Marko Lindqvist, 09/07/2024 01:06 AM

View differences:

client/gui-qt/pages.cpp
// client
#include "client_main.h"
#include "connectdlg_common.h"
#include "svgflag.h"
// gui-qt
#include "colors.h"
......
QTreeWidgetItem *global_item;
QTreeWidgetItem *detach_item;
int conn_id;
bool svg = is_svg_flag_enabled();
conn_num = conn_list_size(game.est_connections);
if (conn_num == 0) {
......
}
psprite = get_nation_flag_sprite(tileset, pplayer->nation);
pixmap = psprite->pm;
item->setData(col, Qt::DecorationRole, *pixmap);
if (svg) {
item->setData(col, Qt::DecorationRole, (*pixmap).scaledToHeight(50));
} else {
item->setData(col, Qt::DecorationRole, *pixmap);
}
break;
case 4:
if (!player_has_color(pplayer)) {
    (1-1/1)