mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
fix wrong size flag bounding rect on windows
This commit is contained in:
parent
f782bd709a
commit
932fe5c237
1 changed files with 5 additions and 0 deletions
|
|
@ -127,8 +127,13 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
|
|||
|
||||
QPainter painter(&pixmap);
|
||||
painter.setPen(Qt::black);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
painter.drawRect(0, 0, pixmap.width(), pixmap.height());
|
||||
#else
|
||||
// determined through trial-and-error that /2 maps the pixmap coords to the painter coords
|
||||
painter.drawRect(0, 0, pixmap.width() / 2, pixmap.height() / 2);
|
||||
#endif
|
||||
|
||||
pmCache.insert(key, pixmap);
|
||||
return pixmap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue