(svn r21763) -Codechange: Pass the distance to Scrollbar::UpdatePosition() in units of small or big steps.

This commit is contained in:
frosch
2011-01-09 20:39:06 +00:00
parent 8b1e64beca
commit a66e145cfa
2 changed files with 28 additions and 4 deletions

View File

@@ -103,9 +103,9 @@ static void ScrollbarClickPositioning(Window *w, NWidgetScrollbar *sb, int x, in
Point pt = HandleScrollbarHittest(sb, mi, ma, sb->type == NWID_HSCROLLBAR);
if (pos < pt.x) {
sb->UpdatePosition(rtl ? sb->GetCapacity() : -sb->GetCapacity());
sb->UpdatePosition(rtl ? 1 : -1, Scrollbar::SS_BIG);
} else if (pos > pt.y) {
sb->UpdatePosition(rtl ? -sb->GetCapacity() : sb->GetCapacity());
sb->UpdatePosition(rtl ? -1 : 1, Scrollbar::SS_BIG);
} else {
_scrollbar_start_pos = pt.x - mi - 9;
_scrollbar_size = ma - mi - 23;