From c5f980195ebf4e249b8759d660a703803fc3e369 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Dec 2013 18:58:13 +0300 Subject: fix chat tabs scrolling issue with enabled colors picker. --- src/gui/windows/chatwindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/windows/chatwindow.cpp') diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 64eeb7669..40cf8e294 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -291,6 +291,7 @@ ChatWindow::ChatWindow(): mChatInput->addKeyListener(this); mCurHist = mHistory.end(); mColorPicker->setVisible(config.getBoolValue("showChatColorsList")); + updateTabsMargin(); fillCommands(); if (player_node && player_node->isGM()) @@ -362,6 +363,18 @@ void ChatWindow::loadGMCommands() mGMLoaded = true; } +void ChatWindow::updateTabsMargin() +{ + if (mColorPicker->isVisible()) + { + mChatTabs->setRightMargin(mColorPicker->getWidth() + 16 + 8); + } + else + { + mChatTabs->setRightMargin(8); + } +} + void ChatWindow::adjustTabSize() { const gcn::Rectangle area = getChildrenArea(); @@ -381,6 +394,7 @@ void ChatWindow::adjustTabSize() mChatTabs->setHeight(height); else mChatTabs->setHeight(height + inputHeight); + updateTabsMargin(); if (showEmotes) { -- cgit v1.2.3-70-g09d2