summaryrefslogtreecommitdiff
path: root/src/gui/scrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r--src/gui/scrollarea.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index 255aa2d8..21f37510 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -296,3 +296,15 @@ void ScrollArea::drawHMarker(gcn::Graphics *graphics)
static_cast<Graphics*>(graphics)->
drawImageRect(dim.x, dim.y, dim.width, dim.height, vMarker);
}
+
+int ScrollArea::getAdjustedWidth() const
+{
+ return ScrollArea::getDimension().width -
+ (mVBarVisible ? ScrollArea::getScrollbarWidth() : 0);
+}
+
+int ScrollArea::getAdjustedHeight() const
+{
+ return ScrollArea::getDimension().height -
+ (mHBarVisible ? ScrollArea::getScrollbarWidth() : 0);
+}