From 58eb085007f207adf529d6075edba7346f65e196 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 6 Jan 2005 10:48:28 +0000 Subject: allow setting padding for pack_start, but only globally (it works like spacing, but also include spacing at beginning, and at end) --- perl-install/mygtk2.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/mygtk2.pm') diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index c088fdbbe..2472d12a9 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -539,11 +539,13 @@ sub _gtknew_handle_children { exists $opts->{children_loose} ? map { [ 1, $_ ] } @{delete $opts->{children_loose}} : exists $opts->{children} ? group_by2(@{delete $opts->{children}}) : (); + my $padding = delete $opts->{padding}; + foreach (@child) { my ($fill, $child) = @$_; $fill eq '0' || $fill eq '1' or internal_error("odd {children} parameter must be 0 or 1 (got $fill)"); ref $child or $child = Gtk2::WrappedLabel->new($child); - $w->pack_start($child, $fill, $fill, 0); + $w->pack_start($child, $fill, $fill, $padding || 0); $child->show; } } -- cgit v1.2.1