diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-02 17:05:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-02 17:05:22 +0300 |
commit | 3279c64d25124dbe759f7ba4fffe5554c3dd9e1e (patch) | |
tree | caa87efca43cf2d959565f472ba039c2f2c48bb0 /src/gui/windows | |
parent | ef0f7af63a5e1bd73fb34c601f996e7aadf848c0 (diff) | |
download | mv-3279c64d25124dbe759f7ba4fffe5554c3dd9e1e.tar.gz mv-3279c64d25124dbe759f7ba4fffe5554c3dd9e1e.tar.bz2 mv-3279c64d25124dbe759f7ba4fffe5554c3dd9e1e.tar.xz mv-3279c64d25124dbe759f7ba4fffe5554c3dd9e1e.zip |
Improve isVisible usage.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 22 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 6 |
2 files changed, 12 insertions, 16 deletions
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<int>(Input::KEY_GUI_CANCEL) && - mChatInput->isVisible()) + mChatInput->isVisibleLocal()) { mChatInput->processVisible(false); } else if (actionId == static_cast<int>(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<int>(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(); diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 885ea619b..93a6a6a10 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -162,7 +162,7 @@ MiniStatusWindow::~MiniStatusWindow() ProgressBar *bar = *it; if (!bar) continue; - if (!bar->isVisible()) + if (!bar->isVisibleLocal()) delete bar; } mBars.clear(); @@ -200,7 +200,7 @@ void MiniStatusWindow::updateBars() ProgressBar *const bar = *it; if (!bar) continue; - if (bar->isVisible()) + if (bar->isVisibleLocal()) { bar->setPosition(x, 0); add(bar); @@ -507,7 +507,7 @@ void MiniStatusWindow::saveBars() const FOR_EACH (ProgressBarVectorCIter, it, mBars) { const ProgressBar *const bar = *it; - if (!bar->isVisible()) + if (!bar->isVisibleLocal()) { config.setValue("ministatus" + toString(i), bar->getActionEventId()); |