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 644199 - Make hard-coded GtkFrame label padding optional
Make hard-coded GtkFrame label padding optional
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 458246 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-08 13:16 UTC by Murray Cumming
Modified: 2015-12-16 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add style properties (7.73 KB, patch)
2011-04-20 13:39 UTC, David King
none Details | Review
example of style property usage (988 bytes, application/octet-stream)
2011-04-20 13:40 UTC, David King
  Details

Description Murray Cumming 2011-03-08 13:16:53 UTC
GtkFrame has some hard-coded padding at the left (LABEL_PAD and LABEL_SIDE_PAD):
http://git.gnome.org/browse/gtk+/tree/gtk/gtkframe.c#n647

This seems wrong and arbitrary but I guess it can't be changed now without disturbing existing applications. It would be nice if it was optional. Then I could make the labels align nicely with other parts of my UI.
Comment 1 Matthias Clasen 2011-03-12 18:10:00 UTC
This is _very_ old stuff, probably around since GtkFrame first entered the code base. But I agree, it should be made optional.
Comment 2 David King 2011-03-21 09:10:55 UTC
Would it be appropriate to add two style properties (label-pad and label-side-pad), a single style property (label-pad?) or is there another approach that would be more suitable?
Comment 3 Murray Cumming 2011-04-06 10:55:21 UTC
Matthias, do you have an opinion for David so he can go ahead?
Comment 4 Matthias Clasen 2011-04-06 11:31:41 UTC
A style property doesn't help if you want to avoid disturbing old applications.
Comment 5 Murray Cumming 2011-04-14 07:47:50 UTC
(In reply to comment #4)
> A style property doesn't help if you want to avoid disturbing old applications.

But would it be appropriate anyway?
Comment 6 David King 2011-04-20 13:39:10 UTC
Created attachment 186353 [details] [review]
add style properties

Attached is a proposed patch to add style properties that control the gap spacing and the padding between the side of the frame and the label. Any suggestions are welcome, as I'd be happier with a more elegant approach, but this seems to cover the use case that Murray has. I'll attach an example next.
Comment 7 David King 2011-04-20 13:40:06 UTC
Created attachment 186354 [details]
example of style property usage

Attaching an example of how to use the style properties to remove the padding of a GtkFrame label.
Comment 8 Murray Cumming 2011-10-17 10:30:10 UTC
Mathias, what do you think of the patch? Would you prefer something else?
Comment 9 Murray Cumming 2011-10-28 07:59:48 UTC
*** Bug 458246 has been marked as a duplicate of this bug. ***
Comment 10 André Klapper 2012-02-03 13:36:00 UTC
Matthias: Can this get a review, please?
Comment 11 Murray Cumming 2012-06-08 14:34:58 UTC
I'm still hoping for a review, hoping to get this change into GTK+, please.
Comment 12 Murray Cumming 2014-06-03 08:08:05 UTC
As far as I know this is still a problem. Could someone look at the patch, please?