From 3279c64d25124dbe759f7ba4fffe5554c3dd9e1e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Apr 2014 17:05:22 +0300 Subject: Improve isVisible usage. --- src/gui/windows/chatwindow.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/gui/windows/chatwindow.cpp') diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 8d1d3e046..05ee56356 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -314,14 +314,10 @@ void ChatWindow::loadGMCommands() void ChatWindow::updateTabsMargin() { - if (mColorPicker->isVisible()) - { + if (mColorPicker->isVisibleLocal()) mChatTabs->setRightMargin(mColorPicker->getWidth() + 16 + 8); - } else - { mChatTabs->setRightMargin(8); - } } void ChatWindow::adjustTabSize() @@ -339,7 +335,7 @@ void ChatWindow::adjustTabSize() mChatInput->setPosition(frame, y); mChatTabs->setWidth(awFrame2); const int height = ah - frame2 - (inputHeight + frame2); - if (mChatInput->isVisible() || !config.getBoolValue("hideChatInput")) + if (mChatInput->isVisibleLocal() || !config.getBoolValue("hideChatInput")) mChatTabs->setHeight(height); else mChatTabs->setHeight(height + inputHeight); @@ -362,7 +358,7 @@ void ChatWindow::adjustTabSize() y -= 2; } mChatInput->setWidth(w); - mChatButton->setVisible(mChatInput->isVisible()); + mChatButton->setVisible(mChatInput->isVisibleLocal()); mChatButton->setPosition(x, y); } else @@ -514,7 +510,7 @@ void ChatWindow::action(const ActionEvent &event) { if (emoteWindow) { - if (emoteWindow->isVisible()) + if (emoteWindow->isVisibleLocal()) emoteWindow->hide(); else emoteWindow->show(); @@ -553,7 +549,7 @@ void ChatWindow::action(const ActionEvent &event) } } - if (mColorPicker && mColorPicker->isVisible() + if (mColorPicker && mColorPicker->isVisibleLocal() != config.getBoolValue("showChatColorsList")) { mColorPicker->setVisible(config.getBoolValue( @@ -839,12 +835,12 @@ void ChatWindow::keyPressed(KeyEvent &event) return; } else if (actionId == static_cast(Input::KEY_GUI_CANCEL) && - mChatInput->isVisible()) + mChatInput->isVisibleLocal()) { mChatInput->processVisible(false); } else if (actionId == static_cast(Input::KEY_CHAT_PREV_HISTORY) && - mChatInput->isVisible()) + mChatInput->isVisibleLocal()) { const ChatTab *const tab = getFocused(); if (tab && tab->hasRows()) @@ -876,7 +872,7 @@ void ChatWindow::keyPressed(KeyEvent &event) } } else if (actionId == static_cast(Input::KEY_CHAT_NEXT_HISTORY) && - mChatInput->isVisible()) + mChatInput->isVisibleLocal()) { const ChatTab *const tab = getFocused(); if (tab && tab->hasRows()) @@ -915,7 +911,7 @@ void ChatWindow::keyPressed(KeyEvent &event) { if (emoteWindow) { - if (emoteWindow->isVisible()) + if (emoteWindow->isVisibleLocal()) emoteWindow->hide(); else emoteWindow->show(); -- cgit v1.2.3-70-g09d2