diff options
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 72772b880..d35a29088 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -184,9 +184,15 @@ void Minimap::setMap(const Map *const map) + getTitleBarHeight() + getPadding(); const int mapWidth = mMapImage->mBounds.w < 100 ? width : 100; const int mapHeight = mMapImage->mBounds.h < 100 ? height : 100; - - setMinWidth(mapWidth); - setMinHeight(mapHeight); + int minWidth = mapWidth; + int minHeight = mapHeight; + if (mapWidth > 310) + minWidth = 310; + if (mapHeight > 220) + minHeight = 220; + + setMinWidth(minWidth); + setMinHeight(minHeight); mWidthProportion = static_cast<float>( mMapImage->mBounds.w) / static_cast<float>(map->getWidth()); |