After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 372452 - statusbar size-allocate tweak for replaced frame contents
statusbar size-allocate tweak for replaced frame contents
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-11-08 13:26 UTC by Christian Persch
Modified: 2006-12-25 12:11 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
proposed patch (1.73 KB, patch)
2006-11-08 13:27 UTC, Christian Persch
committed Details | Review

Description Christian Persch 2006-11-08 13:26:48 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.
Comment 1 Christian Persch 2006-11-08 13:27:18 UTC
Created attachment 76205 [details] [review]
proposed patch
Comment 2 Matthias Clasen 2006-12-25 01:29:21 UTC
Looks fine.
Comment 3 Christian Persch 2006-12-25 12:11:52 UTC
        * 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.