summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-26 16:01:14 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-26 16:01:14 +0200
commit02d6bcd53e06e1caeb335bd9b12bb16cc982d656 (patch)
tree37ac4f0f57d6d293bad24332d14e31b1cbb06f1d /src/gui/widgets/scrollarea.cpp
parent0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48 (diff)
downloadmv-02d6bcd53e06e1caeb335bd9b12bb16cc982d656.tar.gz
mv-02d6bcd53e06e1caeb335bd9b12bb16cc982d656.tar.bz2
mv-02d6bcd53e06e1caeb335bd9b12bb16cc982d656.tar.xz
mv-02d6bcd53e06e1caeb335bd9b12bb16cc982d656.zip
Fix scrollbar regression.
Yes, code look like hack, but it working.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 2cc745ccd..a78048314 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -50,7 +50,9 @@ ScrollArea::ScrollArea():
mVertexes(new GraphicsVertexes()),
mRedraw(true),
mXOffset(0),
- mYOffset(0)
+ mYOffset(0),
+ mDrawWidth(0),
+ mDrawHeight(0)
{
addWidgetListener(this);
init();
@@ -65,9 +67,11 @@ ScrollArea::ScrollArea(gcn::Widget *widget):
mVertexes(new GraphicsVertexes()),
mRedraw(true),
mXOffset(0),
- mYOffset(0)
+ mYOffset(0),
+ mDrawWidth(0),
+ mDrawHeight(0)
{
- addWidgetListener(this);
+// addWidgetListener(this);
init();
}
@@ -339,6 +343,12 @@ void ScrollArea::drawFrame(gcn::Graphics *graphics)
mXOffset = rect.xOffset;
mYOffset = rect.yOffset;
}
+ else if (rect.width != mDrawWidth || rect.height != mDrawHeight)
+ {
+ recalc = true;
+ mDrawWidth = rect.width;
+ mDrawHeight = rect.height;
+ }
}
if (recalc)