summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-07 23:19:10 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-08 00:03:27 +0300
commit61681702b870bd62acda5b4ee664ee62c962132e (patch)
tree3637078dc02a8b6508949b1d61d0f048819cf1e4 /src/gui/chatwindow.cpp
parentef24fa57b33d955d902ece73ac78c07acd3429d8 (diff)
downloadmv-61681702b870bd62acda5b4ee664ee62c962132e.tar.gz
mv-61681702b870bd62acda5b4ee664ee62c962132e.tar.bz2
mv-61681702b870bd62acda5b4ee664ee62c962132e.tar.xz
mv-61681702b870bd62acda5b4ee664ee62c962132e.zip
Fix chat window size in small screens.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp16
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);