summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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);