step increment in gnome canvas



hello!

GnomeCanvas does not set step_increment of its adjustments, rendering
scrollbar buttons of a scrolled window that contains it rather useless
by default. the attached patch fixes the problem, may I commit it?

regards,
	jaKa

-- 

email: jaka gnu org
w3:    http://pluton.ijs.si/~jaka

Index: gnome-canvas.c
===================================================================
RCS file: /cvs/gnome/libgnomecanvas/libgnomecanvas/gnome-canvas.c,v
retrieving revision 1.161
diff -u -r1.161 gnome-canvas.c
--- gnome-canvas.c	9 May 2002 01:51:08 -0000	1.161
+++ gnome-canvas.c	21 Sep 2002 21:00:24 -0000
@@ -2436,9 +2436,15 @@
 
 	canvas->layout.hadjustment->page_size = allocation->width;
 	canvas->layout.hadjustment->page_increment = allocation->width / 2;
-
+	canvas->layout.hadjustment->step_increment = allocation->width / 100;
+	if(canvas->layout.hadjustment->step_increment < 1)
+		canvas->layout.hadjustment->step_increment = 1;
+ 
 	canvas->layout.vadjustment->page_size = allocation->height;
 	canvas->layout.vadjustment->page_increment = allocation->height / 2;
+	canvas->layout.vadjustment->step_increment = allocation->height / 100;
+	if(canvas->layout.vadjustment->step_increment < 1)
+		canvas->layout.vadjustment->step_increment = 1;
 
 	scroll_to (canvas,
 		   canvas->layout.hadjustment->value,

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]