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.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index 44ef929b..834a7f3a 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -213,29 +213,21 @@ void ScrollArea::draw(gcn::Graphics *graphics)
void ScrollArea::drawFrame(gcn::Graphics *graphics)
{
- int bs = getFrameSize();
- int w = getWidth() + bs * 2;
- int h = getHeight() + bs * 2;
-
if (mOpaque)
{
+ int bs = getFrameSize();
+ int w = getWidth() + bs * 2;
+ int h = getHeight() + bs * 2;
+
static_cast<Graphics*>(graphics)->
- drawImageRect(0, 0, w, h, background);
+ drawImageRect(0, 0, w, h, background);
}
}
void ScrollArea::setOpaque(bool opaque)
{
mOpaque = opaque;
-
- if (mOpaque)
- {
- setFrameSize(2);
- }
- else
- {
- setFrameSize(0);
- }
+ setFrameSize(mOpaque ? 2 : 0);
}
void ScrollArea::drawButton(gcn::Graphics *graphics, BUTTON_DIR dir)