Re: Help wth packing

Thanks for your kind reply Kjell.
At last I know that I'm doing right with the code.
I hope that Murray can dig this and that can be fixed if finally it is a bug.

De: Kjell Ahlstedt <kjell ahlstedt bredband net>
Para: Carlos Lopez Gonzalez <carloslopezgonzalez yahoo es>
CC: "gtkmm-list gnome org" <gtkmm-list gnome org>
Enviado: jueves 29 de septiembre de 2011 16:40
Asunto: Re: Help wth packing

Hi Carlos,

No, I can't get the behavior that you want, and that Gimp achieves.

I think Murray is right in suspecting a problem with GtkToolPalette's
size request code.

I suspect an error in GtkToolItemGroup, in
gtk_tool_item_group_size_request(). It seems it requests the same size
whether the GtkToolItemGroup is expanded or collapsed. But I'm not sure.
The size request and size allocation code is quite complex.


ons 2011-09-28 klockan 20:10 +0100 skrev Carlos Lopez Gonzalez:
> Hi Kjell,
> adding an Alignment places the label just below the ToolPalette but
> this is what happen:
> When available space is minimum, the VBox gives a vertical space to
> the ToolPalette equal than the space needed to show all the
> ToolItemGroups.
> Immediately after the ToolPalette here comes the other widget.
> But if I give more space (enlarging the window) VBox divides it
> between the ToolPalette and the other widget enlarging the space in
> favor of the other widget and not giving to the ToolPalette all the
> needed space (when it is fully expanded)
> You can test it with the source code here:
> and modifying the lines with this code:
>  Gtk::Alignment *my_alignment=Gtk::manage(new Gtk::Alignment(0.0,
> 0.0, 0.0, 0.0));
>  Gtk::Label *my_label=Gtk::manage(new  Gtk::Label("Label"));
>  m_VBox.pack_start(m_ToolPalette, Gtk::PACK_EXPAND_WIDGET);
>  m_VBox.pack_start(*my_alignment, Gtk::PACK_EXPAND_WIDGET);
>  my_alignment->add(*my_label);
> This is visually what I get:
> 1) When ToolPallete is collapsed I have this:
> 2) If I expand one of the ToolItemGroups I have this:
> 3) If I enlarge the window I get this:
> 4) When I really want this:
> Thanks!

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