r5405 vince - /branches/vince/netsurf-fb/framebuffer/fb_gui.c

netsurf at semichrome.net netsurf at semichrome.net
Tue Sep 23 09:09:06 BST 2008


Author: vince
Date: Tue Sep 23 03:09:05 2008
New Revision: 5405

URL: http://source.netsurf-browser.org?rev=5405&view=rev
Log:
fix vertical scroll limit

Modified:
    branches/vince/netsurf-fb/framebuffer/fb_gui.c

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.c?rev=5405&r1=5404&r2=5405&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.c Tue Sep 23 03:09:05 2008
@@ -63,12 +63,13 @@
 	if (c->locked) return;
 
 	LOG(("panning %d, %d from %d, %d in content %d,%d",g->panx, g->pany,g->scrollx,g->scrolly,c->width, c->height));
-	/* dont pan off teh top or bottom */
+	/* dont pan off the top */
 	if ((g->scrolly + g->pany) < 0)
 		g->pany = -g->scrolly;
 
-	if ((g->scrolly + g->pany) > c->height)
-		g->pany = c->height - g->scrolly;
+        /* do not pan off the bottom of the content */
+	if ((g->scrolly + g->pany) > (c->height - g->height))
+		g->pany = (c->height - g->height) - g->scrolly;
 
 	LOG(("panning %d, %d",g->panx, g->pany));
 




More information about the netsurf-commits mailing list