Re: Gnome-core



Damon Chaplin <damon@karuna.freeserve.co.uk> writes:

> George wrote:
> > 
> > On Wed, Oct 13, 1999 at 09:27:09PM +0100, Damon Chaplin wrote:
> > > That seems to work, but I don't know much about the panel code so it may
> > > not be a good idea.
> > 
> > Actually, now that I'm looking at the code, it's definately wrong and it
> > shouldn't actually work.
> > Shown alloc is the allocation of a normally shown panel, if you notice it
> > gets set it size allocate by getting the position of where the shown panel
> > should be, and then the real allocation is modified if we are hidden.
> 
> I think that's incorrect. I think shown_alloc also takes the shown/hidden
> states into account.

No, it doesn't.

>From HEAD basp-widget.c:

	if (klass->get_size)
		klass->get_size(basep,
				&chreq.width,
				&chreq.height);
	if (klass->get_pos)
		klass->get_pos (basep,
				&allocation->x,
				&allocation->y,
				chreq.width,
				chreq.height);

	allocation->width = challoc.width = chreq.width;
	allocation->height = challoc.height = chreq.height;
	challoc.x = challoc.y = 0;

	basep->shown_alloc = *allocation;

	if (basep->state != BASEP_SHOWN) {
		PanelOrientType hide_orient = 
			klass->get_hide_orient (basep);

		klass->get_hide_size (basep, hide_orient,
				     &allocation->width,
				     &allocation->height);

		klass->get_hide_pos (basep, hide_orient,
				     &allocation->x,
				     &allocation->y,
				     basep->shown_alloc.width,
				     basep->shown_alloc.height);

Jacob
-- 
"Me fail English?  That's unpossible!" - R. Wiggum



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