From 9af6e761373f25b56e815f1f75b44473474cf280 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 10 Aug 2009 20:28:23 -0600 Subject: Fix TabbedArea and ScrollArea to resize contents Also remove that code from SkillDialog. I tried to do the same with ChatWindow, but it kept segfaulting. Will try again later. --- src/gui/skilldialog.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/gui/skilldialog.cpp') diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index a0bfaf53..01b6e5ae 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -122,25 +122,6 @@ void SkillDialog::action(const gcn::ActionEvent &event) } } -void SkillDialog::adjustTabSize() -{ - gcn::Widget *content = mTabs->getCurrentWidget(); - if (content) { - int width = mTabs->getWidth() - 2 * content->getFrameSize() - 2 * mTabs->getFrameSize(); - int height = mTabs->getContainerHeight() - 2 * content->getFrameSize(); - content->setSize(width, height); - content->setVisible(true); - content->logic(); - } -} - -void SkillDialog::widgetResized(const gcn::Event &event) -{ - Window::widgetResized(event); - - adjustTabSize(); -} - void SkillDialog::logic() { Window::logic(); @@ -148,7 +129,6 @@ void SkillDialog::logic() Tab *tab = dynamic_cast(mTabs->getSelectedTab()); if (tab != mCurrentTab) { mCurrentTab = tab; - adjustTabSize(); } } @@ -248,8 +228,6 @@ void SkillDialog::loadSkills(const std::string &file) } } } - - adjustTabSize(); update(); } -- cgit v1.2.3-70-g09d2