diff options
author | Alexander Tkachev | 2019-07-31 00:15:55 +0700 |
---|---|---|
committer | Matan Bareket | 2019-08-03 04:35:48 -0400 |
commit | c91bcbfb94de77d8aa1c168e904209efb7e2618b (patch) | |
tree | cf229260252746b656ff71c0870c758d2f782854 /gui/widgets | |
parent | 32a997d243f61f9b7003506417098d20205cba8c (diff) | |
download | scummvm-rg350-c91bcbfb94de77d8aa1c168e904209efb7e2618b.tar.gz scummvm-rg350-c91bcbfb94de77d8aa1c168e904209efb7e2618b.tar.bz2 scummvm-rg350-c91bcbfb94de77d8aa1c168e904209efb7e2618b.zip |
GUI: Fix scrollbars
- removed +1px in ListWidget, added in lordhoto's 2007 commit 68eb28a
(aka r29971 in svn) `Fix for bug #1670082 "GUI: Modern theme gfx glitch
in launcher".`, because it made clip this last line of scrollbar in all
themes, which doesn't look good. In 2007 theme was written in .ini,
which is not the case now. I don't see any glitches after removing this
"fix";
- fixed how scrollbar top and bottom scroll buttons are drawn in
ThemeEngine::drawScrollbar: there were these weird magic numbers, but in
reality extra space that buttons should occupy is hardcoded in
scrollbar.cpp (ScrollBarWidget) and is just +1px.
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/list.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index 6dd4ab4dd5..74239f889d 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -41,7 +41,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui // This ensures that _entriesPerPage is properly initialized. reflowLayout(); - _scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h); + _scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h); _scrollBar->setTarget(this); setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); @@ -72,7 +72,7 @@ ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *too // This ensures that _entriesPerPage is properly initialized. reflowLayout(); - _scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h); + _scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h); _scrollBar->setTarget(this); setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); @@ -658,7 +658,7 @@ void ListWidget::reflowLayout() { assert(_entriesPerPage > 0); if (_scrollBar) { - _scrollBar->resize(_w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h); + _scrollBar->resize(_w - _scrollBarWidth, 0, _scrollBarWidth, _h); scrollBarRecalc(); scrollToCurrent(); } |