summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-28 02:12:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-28 02:12:32 +0300
commit7898fc26ca13913637bd84008df016763358d082 (patch)
tree13ffeeab17bebd8e79391bfc75cc3cd38d068cdc /src/gui/widgets/scrollarea.cpp
parentf60d54307c20d4150e630620dbe0be62b2a1b8a5 (diff)
downloadplus-7898fc26ca13913637bd84008df016763358d082.tar.gz
plus-7898fc26ca13913637bd84008df016763358d082.tar.bz2
plus-7898fc26ca13913637bd84008df016763358d082.tar.xz
plus-7898fc26ca13913637bd84008df016763358d082.zip
Simplify scrollarea opaque flag.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 3635e5f4f..214874f69 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -49,14 +49,14 @@ static std::string const buttonFiles[2] =
"scrollbuttons_pressed.xml"
};
-ScrollArea::ScrollArea():
+ScrollArea::ScrollArea(bool opaque):
gcn::ScrollArea(),
mX(0),
mY(0),
mClickX(0),
mClickY(0),
mHasMouse(false),
- mOpaque(true),
+ mOpaque(opaque),
mVertexes(new GraphicsVertexes()),
mRedraw(true),
mXOffset(0),
@@ -68,14 +68,14 @@ ScrollArea::ScrollArea():
init();
}
-ScrollArea::ScrollArea(gcn::Widget *widget):
+ScrollArea::ScrollArea(gcn::Widget *widget, bool opaque):
gcn::ScrollArea(widget),
mX(0),
mY(0),
mClickX(0),
mClickY(0),
mHasMouse(false),
- mOpaque(true),
+ mOpaque(opaque),
mVertexes(new GraphicsVertexes()),
mRedraw(true),
mXOffset(0),
@@ -114,8 +114,7 @@ ScrollArea::~ScrollArea()
void ScrollArea::init()
{
- // Draw background by default
- setOpaque(true);
+ setOpaque(mOpaque);
setUpButtonScrollAmount(2);
setDownButtonScrollAmount(2);