From 932fe5c23736ef3dfd046547b028cd117dcb7522 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Sun, 2 Feb 2025 21:35:53 -0800 Subject: [PATCH] fix wrong size flag bounding rect on windows --- cockatrice/src/client/ui/pixel_map_generator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cockatrice/src/client/ui/pixel_map_generator.cpp b/cockatrice/src/client/ui/pixel_map_generator.cpp index 350bdb5d1..20d146e80 100644 --- a/cockatrice/src/client/ui/pixel_map_generator.cpp +++ b/cockatrice/src/client/ui/pixel_map_generator.cpp @@ -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;