summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-05 13:50:11 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-05 16:11:23 +0100
commitc0721a0f5cf8694319c1f6849ea32864b31c825a (patch)
tree404fe5dbcdc64750c317c68e942f5686fec0243e /src/gui/chatwindow.cpp
parent8b45afbbebeda5e4eef6d15a232f63ced0958135 (diff)
downloadMana-c0721a0f5cf8694319c1f6849ea32864b31c825a.tar.gz
Mana-c0721a0f5cf8694319c1f6849ea32864b31c825a.tar.bz2
Mana-c0721a0f5cf8694319c1f6849ea32864b31c825a.tar.xz
Mana-c0721a0f5cf8694319c1f6849ea32864b31c825a.zip
Fixed some layout issues with the chat window
One pixel of the scroll bar wasn't visible since the mWidgetContainer is shifted by one pixel by gcn::TabbedArea::adjustSize, which wasn't being taken into account by our custom mWidgetContainer sizing code. Fixed that by just letting Guichan handle it. Another issue was that the tab scroll arrows were appearing before they were needed, since they took into account their own size when checking whether the tabs had enough space. Finally, a Layout has a default padding of 6 pixels but this is a little much for the chat window. I reduced it to 3 pixels now. Reviewed-by: Erik Schilling
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 2f5108ff..0bf8d493 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -36,6 +36,7 @@
#include "gui/widgets/channeltab.h"
#include "gui/widgets/chattab.h"
#include "gui/widgets/itemlinkhandler.h"
+#include "gui/widgets/layout.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/tabbedarea.h"
#include "gui/widgets/textfield.h"
@@ -101,7 +102,7 @@ ChatWindow::ChatWindow():
setupWindow->registerWindowForReset(this);
// no title presented, title bar is padding so window can be moved.
- gcn::Window::setTitleBarHeight(gcn::Window::getPadding() + 4);
+ setTitleBarHeight(getPadding() + 4);
setShowTitle(false);
setResizable(true);
setDefaultVisible(true);
@@ -118,6 +119,7 @@ ChatWindow::ChatWindow():
mChatTabs = new TabbedArea;
+ getLayout().setPadding(3);
place(0, 0, mChatTabs, 3, 3);
place(0, 3, mChatInput, 3);