mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
Don't feed negative values to the scroller
svn path=/trunk/netsurf/; revision=10909
This commit is contained in:
parent
3529ead319
commit
c07c79cc5e
10
amiga/tree.c
10
amiga/tree.c
@ -248,12 +248,18 @@ void ami_tree_scroll(struct treeview_window *twin, int sx, int sy)
|
||||
GetAttr(SCROLLER_Top, twin->objects[OID_HSCROLL], (ULONG *)&x);
|
||||
GetAttr(SCROLLER_Top, twin->objects[OID_VSCROLL], (ULONG *)&y);
|
||||
|
||||
x += sx;
|
||||
y += sy;
|
||||
|
||||
if(y < 0) y = 0;
|
||||
if(x < 0) x = 0;
|
||||
|
||||
RefreshSetGadgetAttrs((APTR)twin->objects[OID_VSCROLL], twin->win, NULL,
|
||||
SCROLLER_Top, y + sy,
|
||||
SCROLLER_Top, y,
|
||||
TAG_DONE);
|
||||
|
||||
RefreshSetGadgetAttrs((APTR)twin->objects[OID_HSCROLL], twin->win, NULL,
|
||||
SCROLLER_Top, x + sx,
|
||||
SCROLLER_Top, x,
|
||||
TAG_DONE);
|
||||
|
||||
ami_tree_draw(twin);
|
||||
|
Loading…
Reference in New Issue
Block a user