diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-30 23:54:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-30 23:54:59 +0300 |
commit | c293b93a9383e61988f2a4a3c59e4aac798f2325 (patch) | |
tree | a03de83fd17a52506a4b430ee8a961a2a3b3a53a /src/gui/minimap.cpp | |
parent | 6266c8c8d379bf05936a04e744343ef4b2d8775b (diff) | |
download | mv-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.gz mv-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.bz2 mv-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.xz mv-c293b93a9383e61988f2a4a3c59e4aac798f2325.zip |
Fix minimal windows sizes for very small screens (320x240)
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()); |