From ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Thu, 15 Jan 2009 22:58:07 -0700 Subject: A little bit of code cleanup/simplification. TODO: Figure out how the itempopup transparency is broken and fix it (broken on code import). Best guess would be that the window is attached to a widget which is then attached to a window, causing a break in updates to the transparency code. Signed-off-by: Ira Rice --- src/gui/scrollarea.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/gui/scrollarea.cpp') diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index ba119a61..07b4027b 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -108,8 +108,10 @@ void ScrollArea::init() int vsgridy[4] = {0, 4, 15, 19}; a = 0; - for (y = 0; y < 3; y++) { - for (x = 0; x < 3; x++) { + for (y = 0; y < 3; y++) + { + for (x = 0; x < 3; x++) + { vMarker.grid[a] = vscroll->getSubImage( vsgridx[x], vsgridy[y], vsgridx[x + 1] - vsgridx[x], @@ -200,7 +202,8 @@ void ScrollArea::drawFrame(gcn::Graphics *graphics) int w = getWidth() + bs * 2; int h = getHeight() + bs * 2; - if (mOpaque) { + if (mOpaque) + { static_cast(graphics)-> drawImageRect(0, 0, w, h, background); } @@ -210,10 +213,12 @@ void ScrollArea::setOpaque(bool opaque) { mOpaque = opaque; - if (mOpaque) { + if (mOpaque) + { setFrameSize(2); } - else { + else + { setFrameSize(0); } } @@ -223,7 +228,8 @@ void ScrollArea::drawButton(gcn::Graphics *graphics, BUTTON_DIR dir) int state = 0; gcn::Rectangle dim; - switch(dir) { + switch(dir) + { case UP: state = mUpButtonPressed ? 1 : 0; dim = getUpButtonDimension(); -- cgit v1.2.3-70-g09d2