summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-07 04:02:59 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-07 04:02:59 +0300
commit8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213 (patch)
tree6c78e4c5be12c9598c9071a3fdfa17d023a6e8f0 /src/gui
parent8250998753ab423802557d4284fd906a9d8ae2be (diff)
downloadmanaplus-8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213.tar.gz
manaplus-8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213.tar.bz2
manaplus-8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213.tar.xz
manaplus-8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213.zip
Fix resize in skills dialog and social window.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/skilldialog.cpp8
-rw-r--r--src/gui/skilldialog.h2
-rw-r--r--src/gui/socialwindow.cpp8
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/widgets/tabbedarea.h3
5 files changed, 23 insertions, 0 deletions
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<int, SkillInfo*> 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<gcn::Tab*, gcn::Widget*> > TabContainer;