From 1715d0afe44a282a356ca88e47c92ec556f094dd Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 01:42:53 +0100 Subject: Fixed include structure in resource/ directory There is also a new rule that trivial constructors and destructors should no longer be trivially "documented", since this just takes up space with no gain. --- src/gui/scrollarea.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/gui/scrollarea.cpp') 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)-> - 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) -- cgit v1.2.3-70-g09d2