diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-21 00:31:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-21 00:33:56 +0300 |
commit | 8591ff0d0a1ba4cdf70c05b8c6719f2e1cb65348 (patch) | |
tree | ed9947cd93b80c200e7a0ac959c80f320b84decb /src/gui/windows | |
parent | 57d3219bda4f72f82ffa97d0ef9e9c48aa843925 (diff) | |
download | plus-8591ff0d0a1ba4cdf70c05b8c6719f2e1cb65348.tar.gz plus-8591ff0d0a1ba4cdf70c05b8c6719f2e1cb65348.tar.bz2 plus-8591ff0d0a1ba4cdf70c05b8c6719f2e1cb65348.tar.xz plus-8591ff0d0a1ba4cdf70c05b8c6719f2e1cb65348.zip |
add theming parameters for for chat window (chat.xml).
New theme parameters:
emoteButtonSpacing - space between input chat line and emote button. Default 2
emoteButtonY - relative y position for emote button. Default -2
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 09685e88d..b806a33da 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -372,10 +372,9 @@ void ChatWindow::adjustTabSize() const int frame2 = 2 * frame; const int awFrame2 = aw - frame2; const bool showEmotes = config.getBoolValue("showEmotesButton"); - const int chatButtonSize = showEmotes ? 20 : 0; - const int y = ah - inputHeight - frame; + const int chatButtonSize = 20; + int y = ah - inputHeight - frame; mChatInput->setPosition(frame, y); - mChatInput->setWidth(awFrame2 - chatButtonSize); mChatTabs->setWidth(awFrame2); const int height = ah - frame2 - (inputHeight + frame2); if (mChatInput->isVisible() || !config.getBoolValue("hideChatInput")) @@ -385,8 +384,22 @@ void ChatWindow::adjustTabSize() if (showEmotes) { + int w = awFrame2 - chatButtonSize; + int x = aw - frame - chatButtonSize; + if (mSkin) + { + const int ipad = mSkin->getOption("emoteButtonSpacing", 2); + w -= ipad; + y += mSkin->getOption("emoteButtonY", -2); + } + else + { + w -= 2; + y -= 2; + } + mChatInput->setWidth(w); mChatButton->setVisible(mChatInput->isVisible()); - mChatButton->setPosition(aw - frame - chatButtonSize, y); + mChatButton->setPosition(x, y); } else { |