mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 19:47:46 -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);
|
QPainter painter(&pixmap);
|
||||||
painter.setPen(Qt::black);
|
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);
|
painter.drawRect(0, 0, pixmap.width() / 2, pixmap.height() / 2);
|
||||||
|
#endif
|
||||||
|
|
||||||
pmCache.insert(key, pixmap);
|
pmCache.insert(key, pixmap);
|
||||||
return pixmap;
|
return pixmap;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue