summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-08 16:11:38 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-08 18:55:37 +0300
commit946c94cb1fc3273c437efb45f85b44b8ae48ab5f (patch)
tree101e84d2dde665736d30632d08253c2c80002952
parent274d96292571495a45d32364c36531e7ff35aff0 (diff)
downloadplus-946c94cb1fc3273c437efb45f85b44b8ae48ab5f.tar.gz
plus-946c94cb1fc3273c437efb45f85b44b8ae48ab5f.tar.bz2
plus-946c94cb1fc3273c437efb45f85b44b8ae48ab5f.tar.xz
plus-946c94cb1fc3273c437efb45f85b44b8ae48ab5f.zip
Fix chat tab size issue, if enabled hiding chat input.
-rw-r--r--src/gui/chatwindow.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 37a16b429..09c37d952 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -71,8 +71,9 @@
class ChatInput : public TextField, public gcn::FocusListener
{
public:
- ChatInput(TabbedArea *tabs):
+ ChatInput(ChatWindow *window, TabbedArea *tabs):
TextField("", false),
+ mWindow(window),
mChatTabs(tabs)
{
setVisible(false);
@@ -90,20 +91,16 @@ class ChatInput : public TextField, public gcn::FocusListener
void processVisible(bool n)
{
- if (!mChatTabs || isVisible() == n)
+ if (!mWindow || isVisible() == n)
return;
- if (config.getBoolValue("hideChatInput"))
- {
- if (n)
- mChatTabs->setHeight(mChatTabs->getHeight() - getHeight());
- else
- mChatTabs->setHeight(mChatTabs->getHeight() + getHeight());
- }
setVisible(n);
+ if (config.getBoolValue("hideChatInput"))
+ mWindow->adjustTabSize();
}
private:
+ ChatWindow *mWindow;
TabbedArea *mChatTabs;
};
@@ -177,7 +174,7 @@ ChatWindow::ChatWindow():
mChatTabs->enableScrollButtons(true);
mChatTabs->setFollowDownScroll(true);
- mChatInput = new ChatInput(mChatTabs);
+ mChatInput = new ChatInput(this, mChatTabs);
mChatInput->setActionEventId("chatinput");
mChatInput->addActionListener(this);