aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/widgets/scrollcontainer.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp
index b975c42112..fdb02f8be2 100644
--- a/gui/widgets/scrollcontainer.cpp
+++ b/gui/widgets/scrollcontainer.cpp
@@ -111,9 +111,20 @@ void ScrollContainerWidget::handleCommand(CommandSender *sender, uint32 cmd, uin
void ScrollContainerWidget::reflowLayout() {
Widget::reflowLayout();
- recalc();
+
+ //reflow layout of inner widgets
Widget *ptr = _firstWidget;
while (ptr) {
+ ptr->reflowLayout();
+ ptr = ptr->next();
+ }
+
+ //recalculate height
+ recalc();
+
+ //hide those widgets which are out of visible area
+ ptr = _firstWidget;
+ while (ptr) {
int y = ptr->getAbsY() - getChildY();
int h = ptr->getHeight();
bool visible = true;