From 4124c184b26056e4bda71fa1a7229ae161d03235 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 28 Oct 2009 16:30:33 +0000 Subject: update ratio on size-allocate --- perl-install/fs/partitioning_wizard.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index f47019b37..afd1c985c 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -315,7 +315,9 @@ sub create_display_box { $entry->{width} = $entry->{size} * $initial_ratio + $minwidth; if ($last && $last->{device} eq "$entry->{device}") { #- entry is the last resizable partition - my $ratio = $entry->{width} / $entry->{size}; + my $ratio; + my $update_ratio = sub { $ratio = $entry->{width} / $entry->{size} }; + $update_ratio->(); $ev->set_name("PART_vfat"); $w->set_size_request(ceil($ratio * $entry->{min_win}), 0); my $ev2 = Gtk2::EventBox->new; @@ -366,6 +368,8 @@ sub create_display_box { }; $hpane->signal_connect('size-allocate' => sub { my (undef, $alloc) = @_; + $entry->{width} = $alloc->width; + $update_ratio->(); $update_req_size->(); }); $update_size_labels->(); -- cgit v1.2.1