diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 01:42:53 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 01:43:55 +0100 |
commit | 1715d0afe44a282a356ca88e47c92ec556f094dd (patch) | |
tree | 36dcaa69dcf0165c33d7da1c1cc1a9f5fb7e228f /src/gui/scrollarea.cpp | |
parent | 511d9ac780e094767e806c9a448ac973279dd4c8 (diff) | |
download | mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.gz mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.bz2 mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.xz mana-1715d0afe44a282a356ca88e47c92ec556f094dd.zip |
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.
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r-- | src/gui/scrollarea.cpp | 20 |
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) |