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 110365 - Add padding to GtkAlignment
Add padding to GtkAlignment
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.2.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 96374
 
 
Reported: 2003-04-09 09:30 UTC by Murray Cumming
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk_alignment_padding.patch (15.27 KB, patch)
2003-04-09 09:31 UTC, Murray Cumming
none Details | Review
gtk_alignment_padding2.patch (14.04 KB, patch)
2003-04-13 12:46 UTC, Murray Cumming
none Details | Review
gtk_alignment_padding3.patch (15.20 KB, patch)
2003-05-30 13:05 UTC, Murray Cumming
none Details | Review

Description Murray Cumming 2003-04-09 09:30:43 UTC
As disussed on gtk-devel, and as agreed by Owen Taylor, here is a patch
(gtk_alignment_padding.patch) to add 4-sided (or 1, 2, or 3 sides) padding
to GtkAligmnment.

This is not a cvs patch - it's against an old checkout because I have
connection problems.. Also, sorry for forgetting to patch the ChangeLog.

This patch needs to be revised when the private-data feature is in glib
2.4. At the moment it just adds struct fields so it breaks API.
Comment 1 Murray Cumming 2003-04-09 09:31:20 UTC
Created attachment 15594 [details] [review]
gtk_alignment_padding.patch
Comment 2 Murray Cumming 2003-04-09 09:32:12 UTC
Also, this patch adds examples/alignment_padding, which exercises the
new functionality.
Comment 3 Murray Cumming 2003-04-13 12:45:57 UTC
Here (gtk_alignment_padding2.patch) is a revised patch, taking into
account Owen Taylor's comments on gtk-devel. Also, I added some dull
reference docs for the new functions.
Comment 4 Murray Cumming 2003-04-13 12:46:38 UTC
Created attachment 15674 [details] [review]
gtk_alignment_padding2.patch
Comment 5 Owen Taylor 2003-05-20 03:36:45 UTC
Just a few tiny comments:

* A couple of places, you have:

+  GtkAlignmentPrivate *priv = 0;

 the = 0 should be removed; not only do we use NULL, putting
 an assignment here just defeats GCC's uninitialized variable
 warnings and thus increases the chance of error.

* In:

guint*             padding_top,

  We would generally put the * flush with the p of padding
  rather than on the other side.

* The doc comments need function bodies as well as parameter
  description.

 gtk_alignment_set_padding:
 [...]
 Sets the padding on the different sides of the widget.
 The padding is ...

 gtk_alignment_get_padding:
 [...]
 Gets the padding on the different sides of the widget.
 See gtk_alignment_set_padding()

Comment 6 Murray Cumming 2003-05-30 13:05:29 UTC
Created attachment 16987 [details] [review]
gtk_alignment_padding3.patch
Comment 7 Murray Cumming 2003-05-30 13:06:14 UTC
OK, so here's the revised patch (gtk_alignment_padding3.patch).
Comment 8 Owen Taylor 2003-05-30 15:35:34 UTC
Looks great to commit.
Comment 9 Murray Cumming 2003-05-30 18:28:21 UTC
Done. Didn't know it was branched already.