mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
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.
This commit is contained in:
committed by
Matan Bareket
parent
32a997d243
commit
c91bcbfb94
+1
-1
@@ -1030,7 +1030,7 @@ void ThemeEngine::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHe
|
||||
drawDD(kDDScrollbarBase, r);
|
||||
|
||||
Common::Rect r2 = r;
|
||||
const int buttonExtra = (r.width() * 120) / 100;
|
||||
const int buttonExtra = r.width() + 1; // scrollbar.cpp's UP_DOWN_BOX_HEIGHT
|
||||
|
||||
r2.bottom = r2.top + buttonExtra;
|
||||
drawDD(scrollState == kScrollbarStateUp ? kDDScrollbarButtonHover : kDDScrollbarButtonIdle, r2,
|
||||
|
||||
Reference in New Issue
Block a user