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:
RickyRister 2025-02-02 21:43:58 -08:00 committed by GitHub
parent 9680e47bbc
commit ec9feb9f50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;