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.

Kjell

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:
> http://ubuntuone.com/2UCP30FDMF32dP7a8INh1I
> 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:
> http://s85.photobucket.com/albums/k74/Genete/?action=view&current=92e2a2f9.png
> 2) If I expand one of the ToolItemGroups I have this:
> http://s85.photobucket.com/albums/k74/Genete/?action=view&current=1766e7c3.png
> 3) If I enlarge the window I get this:
> http://s85.photobucket.com/albums/k74/Genete/?action=view&current=4e85ec8a.png
> 4) When I really want this:
> http://s85.photobucket.com/albums/k74/Genete/?action=view&current=b3a193cd.png
> 
> Thanks!





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