From 2f5138f7959e74606f0b9493ce9523110d2f46dd Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Mon, 11 Jul 2016 14:30:46 +0600 Subject: GUI: Minor Container fixes I should've done these in PR, I guess. --- gui/widgets/scrollcontainer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui/widgets') diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp index 9251047185..820c00f18a 100644 --- a/gui/widgets/scrollcontainer.cpp +++ b/gui/widgets/scrollcontainer.cpp @@ -68,6 +68,8 @@ void ScrollContainerWidget::recalc() { } h = max - min; + if (h <= _limitH) _scrolledY = 0; + _verticalScroll->_numEntries = h; _verticalScroll->_currentPos = _scrolledY; _verticalScroll->_entriesPerPage = _limitH; @@ -135,6 +137,7 @@ void ScrollContainerWidget::reflowLayout() { } _verticalScroll->setVisible(_verticalScroll->_numEntries > _limitH); //show when there is something to scroll + _verticalScroll->recalc(); } void ScrollContainerWidget::drawWidget() { -- cgit v1.2.3