From ec9feb9f501762a5847ceea96d4c59e853736aa6 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Sun, 2 Feb 2025 21:43:58 -0800 Subject: [PATCH] fix wrong size flag bounding rect on windows (#5556) * fix wrong size flag bounding rect on windows * fix the values --- cockatrice/src/client/ui/pixel_map_generator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/client/ui/pixel_map_generator.cpp b/cockatrice/src/client/ui/pixel_map_generator.cpp index 2fc1d0cd3..7e86d73ac 100644 --- a/cockatrice/src/client/ui/pixel_map_generator.cpp +++ b/cockatrice/src/client/ui/pixel_map_generator.cpp @@ -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;