summaryrefslogtreecommitdiff
path: root/src/gui/emotewindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/emotewindow.cpp')
-rw-r--r--src/gui/emotewindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/emotewindow.cpp b/src/gui/emotewindow.cpp
index fc76f474b..14652a635 100644
--- a/src/gui/emotewindow.cpp
+++ b/src/gui/emotewindow.cpp
@@ -48,6 +48,7 @@ EmoteWindow::EmoteWindow() :
mScrollColorPage(new ScrollArea(mColorPage, false, "emotepage.xml"))
{
setShowTitle(false);
+ setResizable(true);
addMouseListener(this);
const int pad2 = mPadding * 2;
@@ -62,6 +63,7 @@ EmoteWindow::EmoteWindow() :
setTitleBarHeight(getPadding() + getTitlePadding());
mScrollColorPage->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS);
+ mScrollColorPage->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
// TRANSLATORS: emotes tab name
mTabs->addTab(_("Emotes"), mEmotePage);
// TRANSLATORS: emotes tab name
@@ -138,3 +140,17 @@ void EmoteWindow::addListeners(gcn::ActionListener *const listener)
mEmotePage->addActionListener(listener);
mColorPage->addActionListener(listener);
}
+
+void EmoteWindow::widgetResized(const gcn::Event &event)
+{
+ Window::widgetResized(event);
+ const int pad2 = mPadding * 2;
+ const int width = mDimension.width;
+ const int height = mDimension.height;
+
+ mTabs->setSize(width - pad2, height - pad2);
+ mTabs->adjustWidget(mEmotePage);
+ mTabs->adjustWidget(mScrollColorPage);
+ mColorPage->setSize(mScrollColorPage->getWidth(),
+ mScrollColorPage->getHeight());
+}