Project

General

Profile

Feature #764 ยป 0013-Qt-Make-popup-image-to-use-natural-size.patch

Marko Lindqvist, 07/26/2024 11:37 AM

View differences:

client/gui-qt/dialogs.cpp
/**********************************************************************//**
Popup image window
**************************************************************************/
void qtg_popup_image(const char *tag, int width, int height)
void qtg_popup_image(const char *tag, int width_discard, int height_discard)
{
struct sprite *spr = load_popup_sprite(tag);
......
QVBoxLayout *layout = new QVBoxLayout(win);
QPixmap *pm = new QPixmap(*spr->pm);
QLabel *lbl = new QLabel;
int width, height;
get_sprite_dimensions(spr, &width, &height);
win->setFixedSize(width, height);
lbl->setPixmap(*pm);
layout->addWidget(lbl);
    (1-1/1)