Re: GtkContainer Gtk 3.0 vs Gtk 3.2 geometry management



Note I spent a lot of time writing something like this last year.

I would like to eventually port it into GTK+ as the internal implementation
of the GtkToolPalette.

See:
   http://git.gnome.org/browse/libegg/tree/libegg/wrapbox

Cheers,
        -Tristan

On Wed, Oct 19, 2011 at 3:09 PM, Denis Linvinus <linvinus gmail com> wrote:
> Hi all,
> i'm writing new GtkContainer which allocate children, firstly horizontally,
> then vertically. - HVBox.
>
> On gtk 3.0 it works without problems (with little trick), but with gtk 3.2.
> window don't change height when container change, until i move mouse above
> my container.
>
> My idea is that my container should use minimum space as possible, but
> enough to show all children.
> If available width not enough for children then container should increase
> height  for second line, and so on.
> Something like multiline tabs in firefox. (children is a buttons)
>
> There is my sources http://pastebin.com/8qugyfqk (i use valac --pkg gtk+-3.0
> -C ./main.vala to compile)
>
> image with  explanation of the problem
> http://imageshack.us/photo/my-images/508/resulte.png/
> there is two control buttons (add, remove) in one VBox, all other buttons
> in my HVBox container.
> As you can see at last screenshot, i lost two buttons after resize window on
> Gtk3.2, if i move mouse on buttons again then window will change it height ,
> so that the lost buttons will be visible.
>
> I'm check, problem is not in vala, i use generated *.c from ubuntu 11.10 to
> compile on Ubuntu 11.04 without modifications, and it also works correctly.
>
> May be someone know how to force window to recalculate size?
> Or some other method to resolve my problem?
>
> My system ubuntu 11.10
> libgtk-3-0  3.2.0-0ubuntu3
>
> Ubuntu 11.04 for Gtk 3.0
> libgtk-3-0  3.0.8-0ubuntu1
>
> I will appreciate for any help.
> p.s. sorry for my English.
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>


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