diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-07 23:19:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-08 00:03:27 +0300 |
commit | 61681702b870bd62acda5b4ee664ee62c962132e (patch) | |
tree | 3637078dc02a8b6508949b1d61d0f048819cf1e4 /src | |
parent | ef24fa57b33d955d902ece73ac78c07acd3429d8 (diff) | |
download | manaplus-61681702b870bd62acda5b4ee664ee62c962132e.tar.gz manaplus-61681702b870bd62acda5b4ee664ee62c962132e.tar.bz2 manaplus-61681702b870bd62acda5b4ee664ee62c962132e.tar.xz manaplus-61681702b870bd62acda5b4ee664ee62c962132e.zip |
Fix chat window size in small screens.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/chatwindow.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 302c0c72b..4ff2f5f56 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -206,10 +206,22 @@ ChatWindow::ChatWindow(): setSaveVisible(true); setStickyButtonLock(true); + int w = 600; #ifdef ANDROID - setDefaultSize(600, 123, ImageRect::UPPER_LEFT, -110, -35); + if (mainGraphics->getWidth() < 710) + w = mainGraphics->getWidth() - 110; + if (w < 100) + w = 100; + if (mainGraphics->getHeight() < 480) + setDefaultSize(w, 90, ImageRect::UPPER_LEFT, -110, -35); + else + setDefaultSize(w, 123, ImageRect::UPPER_LEFT, -110, -35); #else - setDefaultSize(600, 123, ImageRect::LOWER_LEFT); + if (mainGraphics->getWidth() < 600) + w = mainGraphics->getWidth() - 10; + if (w < 100) + w = 100; + setDefaultSize(w, 123, ImageRect::LOWER_LEFT); #endif setMinWidth(150); setMinHeight(90); |