From b60167a7e9414750f8c5c183e98da811dc9fcee9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 22 Sep 2008 12:30:52 +0000 Subject: (create_widgets_block) restore support for right alignement for simple widgets while still not using fillers when packing both a label & a widget (as in eg ask_user_and_root()) regression introduced in r245853 on 2008-09-17: "(create_widget,create_widgets_block) better layout for right aligned widgets" --- perl-install/NEWS | 2 ++ perl-install/install/NEWS | 2 ++ perl-install/interactive/gtk.pm | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 4c41d1cb8..092b2583e 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- restore support for right alignement for simple widgets + (regression introduced in 11.46 - 17 September 2008) - bootloader-config: o fix handling fd0 (regression introduced in 11.44) (#44049) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 61008d304..be09b2327 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -2,6 +2,8 @@ o ethernet: enic, qlge - i18n: o add support for ibus +- restore support for right alignement for simple widgets + (regression introduced in 11.46 - 17 September 2008) Version 11.48 - 18 September 2008 diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 29ccae084..df4375209 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -656,10 +656,13 @@ sub create_widgets_block { ]); } + my $eater = gtknew('Label') if $e->{alignment} eq 'right' && !$label_w; + $e->{real_w} = gtkpack_(Gtk2::HBox->new, if_($e->{icon}, 0, eval { gtkcreate_img($e->{icon}) }), + if_($eater, 1, $eater), if_($label_w, $e->{alignment} eq 'right', $label_w), - (1, $e->{real_w}), + (!$eater, $e->{real_w}), ); } gtknew('VBox', children => [ map { $_->{grow} || 0, $_->{real_w} } @$l ]); -- cgit v1.2.1