From 8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Oct 2011 04:02:59 +0300 Subject: Fix resize in skills dialog and social window. --- src/gui/skilldialog.cpp | 8 ++++++++ src/gui/skilldialog.h | 2 ++ src/gui/socialwindow.cpp | 8 ++++++++ src/gui/socialwindow.h | 2 ++ src/gui/widgets/tabbedarea.h | 3 +++ 5 files changed, 23 insertions(+) (limited to 'src') diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index 28dbca939..8f45be5d1 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -598,3 +598,11 @@ SkillInfo* SkillDialog::getSkill(int id) { return mSkills[id]; } + +void SkillDialog::widgetResized(const gcn::Event &event) +{ + Window::widgetResized(event); + + if (mTabs) + mTabs->fixSize(); +} diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h index 55dfafc38..21ee56f5e 100644 --- a/src/gui/skilldialog.h +++ b/src/gui/skilldialog.h @@ -86,6 +86,8 @@ class SkillDialog : public Window, public gcn::ActionListener bool hasSkills() { return !mSkills.empty(); } + void widgetResized(const gcn::Event &event); + private: typedef std::map SkillMap; SkillMap mSkills; diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index ab19e501b..a728d4051 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -1632,3 +1632,11 @@ void SocialWindow::updateAttackFilter() if (mAttackFilter) mAttackFilter->updateList(); } + +void SocialWindow::widgetResized(const gcn::Event &event) +{ + Window::widgetResized(event); + + if (mTabs) + mTabs->fixSize(); +} diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h index 04692d843..7dc962316 100644 --- a/src/gui/socialwindow.h +++ b/src/gui/socialwindow.h @@ -123,6 +123,8 @@ public: void updateAttackFilter(); + void widgetResized(const gcn::Event &event); + protected: friend class SocialTab; diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 3ad113b4c..af241d7c5 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -153,6 +153,9 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener bool getFollowDownScroll() { return mFollowDownScroll; } + void fixSize() + { adjustSize(); } + private: typedef std::vector< std::pair > TabContainer; -- cgit v1.2.3-70-g09d2