summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabbedarea.cpp7
-rw-r--r--src/gui/widgets/tabbedarea.h5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 25fc3b8f2..88d12764a 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -196,6 +196,13 @@ void TabbedArea::addTab(Tab *const tab, gcn::Widget *const widget)
updateArrowEnableState();
}
+void TabbedArea::adjustWidget(gcn::Widget *const widget) const
+{
+ const int frameSize = 2 * mFrameSize;
+ widget->setSize(getWidth() - frameSize,
+ getHeight() - frameSize - mTabContainer->getHeight());
+}
+
void TabbedArea::addTab(const std::string &caption, gcn::Widget *const widget)
{
Tab *const tab = new Tab(this);
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 7be1391a5..ca2857709 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -164,9 +164,6 @@ class TabbedArea final : public Widget2,
bool getFollowDownScroll() const A_WARN_UNUSED
{ return mFollowDownScroll; }
- void fixSize()
- { adjustSize(); }
-
void keyPressed(gcn::KeyEvent& keyEvent) override;
void setBlockSwitching(const bool b)
@@ -185,6 +182,8 @@ class TabbedArea final : public Widget2,
void setResizeHeight(bool b)
{ mResizeHeight = b; }
+ void adjustWidget(gcn::Widget *const widget) const;
+
private:
typedef std::vector <std::pair<Tab*, gcn::Widget*> > TabContainer;