Re: GtkFrame adaption again



> > I modified the gtkframe widget to do the following:
> >
> > /-----------  frame.allocation -----------\
> > |
> > |          empty space
> > |
> > |          /---- frame shadow/line ----\
> > |          |      child widget
> > |          |
> > |
> >
> > so that the child widget may change size and is always directly bounded
> > by the frame shadow line and centered inside the frame allocation space.
>
> did you say, you modified the GtkFrame widget ??

Yes, I modified several widgets (gtk 1.2) a little because of minor things I
liked to have, if I found no solution with the official gtk api.

> assuming that I understood you correctly, you can achieve what you
> describe w/o fiddling around in GTK+ internals by putting a standard
> GtkFrame inside a GtkAlignment:
>
>   GtkWidget *align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
>   GtkWidget *frame = gtk_frame_new (NULL);
>
>   gtk_container_add (GTK_CONTAINER (align), frame);

I tried alignments a while ago, but did not think of scale = 0.0. Now, with
scale = 0.0, it still does not work: Wenn I change the child (drawing
area) to smaller size, the frame is not redrawn. The other way
(small->bigger) works. I'm not sure if this is my fault but I believe not.
This behaviour is the same with and without
gtk_container_set_allocate_redraws (alignment).

For now, I will stick with Owen's suggestion, the work to modify gtkframe is
done anyway :)

So long,

Carsten




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