Feature #764 ยป 0013-Qt-Make-popup-image-to-use-natural-size.patch
| 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);
|
||