GNOME Bugzilla – Bug 372452
statusbar size-allocate tweak for replaced frame contents
Last modified: 2006-12-25 12:11:52 UTC
When the statusbar has a resize grip, the statusbar's size-allocate function shrinks the statusbar's label accordingly so it doesn't overlap with the grip. Now consider the case that the programme replaces the statusbar's frame's child (the label) with a container that he packs the label (and some other things) into. [The use case for that is to make it so that the statusbar's frame extends around the whole statusbar like it does when it just contains the label; if you instead just pack other children directly into the statusbar you get missing bits of frame which look ugly.] In this case, the size-allocate should shrink that container instead of the label. I know it's not really nice to poke around in widgets' internal details, but I hope you'll conside the following patch which is functionally completely equivalent to the current code: it just replaces statusbar->label with the frame's child (gtk_bin_get_child) as the widget to shrink.
Created attachment 76205 [details] [review] proposed patch
Looks fine.
* gtk/gtkstatusbar.c: (gtk_statusbar_size_allocate): Don't assume statusbar->label is the statusbar's frame's child when shrinking the size allocation when the grip is shown. Bug #372452.