diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-06 20:44:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-06 20:44:17 +0300 |
commit | d6c201415ccf5b1ceebf92fc588f22dc20f9bd81 (patch) | |
tree | 36f988c54a98ab9ebb4fde1d7c6aa28a5851f1d6 /src/gui/emotewindow.cpp | |
parent | 73e7be1617217396c5f1eead52af87bc7fef2357 (diff) | |
download | manaplus-d6c201415ccf5b1ceebf92fc588f22dc20f9bd81.tar.gz manaplus-d6c201415ccf5b1ceebf92fc588f22dc20f9bd81.tar.bz2 manaplus-d6c201415ccf5b1ceebf92fc588f22dc20f9bd81.tar.xz manaplus-d6c201415ccf5b1ceebf92fc588f22dc20f9bd81.zip |
Allow resize chat emotes window.
Diffstat (limited to 'src/gui/emotewindow.cpp')
-rw-r--r-- | src/gui/emotewindow.cpp | 16 |
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()); +} |