diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-26 19:09:31 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-26 19:09:31 -0600 |
commit | 1a9d402bec2fd8166ce50e30a71ba0cf2f27281a (patch) | |
tree | e012433f561406ebd67d685f205c86c1c13681b3 /src/gui/scrollarea.cpp | |
parent | 2ec46b9a6e5ca1beb043da00cf2bb9d34722ec72 (diff) | |
download | mana-1a9d402bec2fd8166ce50e30a71ba0cf2f27281a.tar.gz mana-1a9d402bec2fd8166ce50e30a71ba0cf2f27281a.tar.bz2 mana-1a9d402bec2fd8166ce50e30a71ba0cf2f27281a.tar.xz mana-1a9d402bec2fd8166ce50e30a71ba0cf2f27281a.zip |
Some code style commits influenced by TMW commit
1715d0afe44a282a356ca88e47c92ec556f094dd
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r-- | src/gui/scrollarea.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 43b27f23..156ff054 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -217,12 +217,12 @@ 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) { + const int bs = getFrameSize(); + const int w = getWidth() + bs * 2; + const int h = getHeight() + bs * 2; + static_cast<Graphics*>(graphics)-> drawImageRect(0, 0, w, h, background); } @@ -232,14 +232,7 @@ 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) |