summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-30 23:54:59 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-30 23:54:59 +0300
commitc293b93a9383e61988f2a4a3c59e4aac798f2325 (patch)
treea03de83fd17a52506a4b430ee8a961a2a3b3a53a /src/gui/minimap.cpp
parent6266c8c8d379bf05936a04e744343ef4b2d8775b (diff)
downloadmv-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.cpp12
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());