Re: [gnomemm] A couple Gnome::Canvas[2] issues...



On Mon, 2002-09-23 at 10:57, Paul Davis wrote:
> >The first is that the behaviour of Canvas is different when expanding
> >windows in the libgnomecanvas demo and the libgnomecanvasmm demo. In the
> >libgnomecanvas demo, the canvas origin stays securly in the upper left
> >hand corner of the container that it is in. In the libgnomecanvasmm
> >implementation the origin of the canvas moves away from the top left
> >corner proportional to the window resize that is occuring.
> 
> this sounds very related to a bug i filed in gnome bugzilla regarding
> canvas "gravity". the canvas in v1 tried to center itself within the
> size of the GtkLayout that is its (hidden) parent. a fix was added
> that provided gravity options; someone complained that it broke
> Evolution badly. i haven't tried it at all. its possible that the C
> version sets the default gravity one way and the C++ one resets that. 

Yikes. A on closer inspection and figuring out what causes the canvas to
scroll like that I have discovered that the default for the canvas is
center_scroll_region = true. The libgnomecanvas demo sets this to false
wheras the libgnomecanvasmm demo does not.

So simply adding set_center_scroll_region(false) to my constructor fixed
the problem.

Thanks,
Owen Stenseth




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