Size of a Gtk::Expander

Hi Gnomer!

I try to resize a window after I unexpand a Gtk::Expander. The window
show a empty place where the hidden child of the expander is supposed to
be. I do not know if it is the expected behaviour or a bug.

A quick code to demonstrate :

require ‘gtk2’

e=Gtk::Expander.new(“toto”)
e.add(Gtk::Label.new(“toto”))
w=Gtk::Window.new
w.add(e)
w.show_all
e.signal_connect(‘activate’){|widget| w.resize(w.size[0], 1)}

Gtk.main

A quick workaround :

require ‘gtk2’

l=Gtk::Label.new(“toto”)
e=Gtk::Expander.new(“toto”)
b=Gtk::VBox.new
b.pack_start(e)
b.pack_start(l)
w=Gtk::Window.new
w.add(b)
w.show_all
l.hide
e.signal_connect(‘notify::expanded’){|widget, foo|
if widget.expanded?
l.show
else
l.hide
w.resize(w.size[0], 1)
end
}

Gtk.main