mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
fix wrong size flag bounding rect on windows (#5556)
* fix wrong size flag bounding rect on windows * fix the values
This commit is contained in:
parent
9680e47bbc
commit
ec9feb9f50
1 changed files with 6 additions and 1 deletions
|
|
@ -134,8 +134,13 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
|
|||
|
||||
QPainter painter(&pixmap);
|
||||
painter.setPen(Qt::black);
|
||||
// determined through trial-and-error that /2 maps the pixmap coords to the painter coords
|
||||
|
||||
// width/height offset was determined through trial-and-error
|
||||
#ifdef Q_OS_WIN
|
||||
painter.drawRect(0, 0, pixmap.width() - 1, pixmap.height() - 1);
|
||||
#else
|
||||
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