diff options
author | Alexander Tkachev | 2016-07-11 14:30:46 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 2f5138f7959e74606f0b9493ce9523110d2f46dd (patch) | |
tree | ccffa732a51c6544c7a3a6ade01427a1a464c08c /gui | |
parent | f01402f4d8cfa5123677708622c4d15e30724b7c (diff) | |
download | scummvm-rg350-2f5138f7959e74606f0b9493ce9523110d2f46dd.tar.gz scummvm-rg350-2f5138f7959e74606f0b9493ce9523110d2f46dd.tar.bz2 scummvm-rg350-2f5138f7959e74606f0b9493ce9523110d2f46dd.zip |
GUI: Minor Container fixes
I should've done these in PR, I guess.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/widgets/scrollcontainer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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() { |