summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 8a34c961..d19231ab 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -30,6 +30,7 @@
#include "gui/recorder.h"
#include "gui/setup.h"
+#include "gui/widgets/browserbox.h"
#include "gui/widgets/chattab.h"
#include "gui/widgets/itemlinkhandler.h"
#include "gui/widgets/layout.h"
@@ -82,7 +83,7 @@ class ChatAutoComplete : public AutoCompleteLister
};
ChatWindow::ChatWindow():
- Window(_("Chat")),
+ Window(SkinType::Popup, _("Chat")),
mItemLinkHandler(new ItemLinkHandler(this)),
mChatInput(new ChatInput),
mAutoComplete(new ChatAutoComplete),
@@ -101,16 +102,20 @@ ChatWindow::ChatWindow():
setResizable(true);
setDefaultVisible(true);
setSaveVisible(true);
- setDefaultSize(600, 123, ImageRect::LOWER_LEFT);
+ setDefaultSize(600, 123, WindowAlignment::BottomLeft);
setMinWidth(150);
setMinHeight(90);
mChatInput->setActionEventId("chatinput");
mChatInput->addActionListener(this);
- getLayout().setPadding(3);
+ // Override the padding from the theme since we want the content very close
+ // to the border on this window.
+ setPadding(std::min<unsigned>(getPadding(), 6));
+ getLayout().setPadding(0);
+
place(0, 0, mChatTabs, 3, 3);
- place(0, 3, mChatInput, 3);
+ place(0, 3, mChatInput, 3).setPadding(mChatInput->getFrameSize());
loadWindowState();
@@ -235,6 +240,7 @@ void ChatWindow::addTab(ChatTab *tab)
// Make sure we don't end up with duplicates in the gui
// TODO
+ tab->mTextOutput->setPalette(getSkin().palette);
mChatTabs->addTab(tab, tab->mScrollArea);
// Update UI