GNOME Bugzilla – Bug 644199
Make hard-coded GtkFrame label padding optional
Last modified: 2015-12-16 20:18:47 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.
This is _very_ old stuff, probably around since GtkFrame first entered the code base. But I agree, it should be made optional.
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?
Matthias, do you have an opinion for David so he can go ahead?
A style property doesn't help if you want to avoid disturbing old applications.
(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?
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.
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.
Mathias, what do you think of the patch? Would you prefer something else?
*** Bug 458246 has been marked as a duplicate of this bug. ***
Matthias: Can this get a review, please?
I'm still hoping for a review, hoping to get this change into GTK+, please.
As far as I know this is still a problem. Could someone look at the patch, please?