summaryrefslogtreecommitdiff
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
parent6266c8c8d379bf05936a04e744343ef4b2d8775b (diff)
downloadmanaplus-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.gz
manaplus-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.bz2
manaplus-c293b93a9383e61988f2a4a3c59e4aac798f2325.tar.xz
manaplus-c293b93a9383e61988f2a4a3c59e4aac798f2325.zip
Fix minimal windows sizes for very small screens (320x240)
-rw-r--r--src/gui/buydialog.cpp2
-rw-r--r--src/gui/didyouknowwindow.cpp2
-rw-r--r--src/gui/helpwindow.cpp2
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/minimap.cpp12
-rw-r--r--src/gui/outfitwindow.cpp2
-rw-r--r--src/gui/questswindow.cpp4
-rw-r--r--src/gui/selldialog.cpp2
-rw-r--r--src/gui/serverdialog.cpp4
-rw-r--r--src/gui/shopwindow.cpp2
-rw-r--r--src/gui/tradewindow.cpp2
-rw-r--r--src/gui/updaterwindow.cpp4
12 files changed, 23 insertions, 17 deletions
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index 5cdb432ec..2fc49d240 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -212,7 +212,7 @@ void BuyDialog::init()
setCloseButton(true);
setStickyButtonLock(true);
setMinWidth(260);
- setMinHeight(230);
+ setMinHeight(220);
setDefaultSize(260, 230, ImageRect::CENTER);
mShopItems = new ShopItems;
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index f0e61536a..65cfdd4e8 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -58,7 +58,7 @@ DidYouKnowWindow::DidYouKnowWindow():
config.getBoolValue("showDidYouKnow"), this, "openagain"))
{
setMinWidth(300);
- setMinHeight(250);
+ setMinHeight(220);
setContentSize(455, 350);
setWindowName("DidYouKnow");
setResizable(true);
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp
index 3dcc19dbb..d93472211 100644
--- a/src/gui/helpwindow.cpp
+++ b/src/gui/helpwindow.cpp
@@ -50,7 +50,7 @@ HelpWindow::HelpWindow():
mScrollArea(new ScrollArea(mBrowserBox, true, "help_background.xml"))
{
setMinWidth(300);
- setMinHeight(250);
+ setMinHeight(220);
setContentSize(455, 350);
setWindowName("Help");
setResizable(true);
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 420cd4da4..1145bde02 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -139,7 +139,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
setStickyButtonLock(true);
setDefaultSize(387, 307, ImageRect::CENTER);
- setMinWidth(316);
+ setMinWidth(310);
setMinHeight(179);
addKeyListener(this);
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());
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 8170b6a9f..cd7e23038 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -87,7 +87,7 @@ OutfitWindow::OutfitWindow():
setDefaultSize(250, 400, 150, 290);
setMinWidth(145);
- setMinHeight(283);
+ setMinHeight(220);
mBorderColor = getThemeColor(Theme::BORDER, 64);
mBackgroundColor = getThemeColor(Theme::BACKGROUND, 32);
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index dae8d1fca..3d58ff299 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -117,8 +117,8 @@ QuestsWindow::QuestsWindow() :
setSaveVisible(true);
setDefaultSize(400, 350, ImageRect::RIGHT);
- setMinWidth(400);
- setMinHeight(350);
+ setMinWidth(310);
+ setMinHeight(220);
mQuestsListBox->setActionEventId("select");
mQuestsListBox->addActionListener(this);
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index 9afd3a554..cb9a5abf8 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -73,7 +73,7 @@ void SellDialog::init()
setCloseButton(true);
setStickyButtonLock(true);
setMinWidth(260);
- setMinHeight(230);
+ setMinHeight(220);
setDefaultSize(260, 230, ImageRect::CENTER);
// Create a ShopItems instance, that is aware of duplicate entries.
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index d76c5fbd3..778166d3b 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -308,8 +308,8 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
getLayout().reflow(width, height);
setContentSize(width, height);
- setMinWidth(getWidth());
- setMinHeight(getHeight());
+ setMinWidth(310);
+ setMinHeight(220);
setDefaultSize(getWidth(), getHeight(), ImageRect::CENTER);
setResizable(true);
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index c2bc4d336..c9a64d938 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -112,7 +112,7 @@ ShopWindow::ShopWindow():
setCloseButton(true);
setStickyButtonLock(true);
setMinWidth(260);
- setMinHeight(230);
+ setMinHeight(220);
setDefaultSize(380, 300, ImageRect::CENTER);
mAnnounceCounter[BUY] = 0;
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index 6beba2357..64f06f6c8 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -85,7 +85,7 @@ TradeWindow::TradeWindow():
setCloseButton(true);
setStickyButtonLock(true);
setDefaultSize(386, 180, ImageRect::CENTER);
- setMinWidth(386);
+ setMinWidth(310);
setMinHeight(180);
if (setupWindow)
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index 531a0ac60..1dc403d25 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -167,8 +167,8 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
setWindowName("UpdaterWindow");
setResizable(true);
setDefaultSize(450, 400, ImageRect::CENTER);
- setMinWidth(320);
- setMinHeight(240);
+ setMinWidth(310);
+ setMinHeight(220);
mProgressBar->setSmoothProgress(false);
mBrowserBox->setOpaque(false);