diff options
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 0fd5c598a..93625e921 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -324,7 +324,7 @@ sub create_automatic_notebooks { # parts: helpers ################################################################################ sub create_buttons4partitions { - my ($kind, $totalsectors, @parts) = @_; + my ($kind, $totalsectors, @all_parts) = @_; if ($w->{window}->get_window) { my $windowwidth = $w->{window}->get_allocated_width; @@ -332,6 +332,8 @@ sub create_buttons4partitions { $width = $windowwidth - first(get_action_box_size()) - 25; } + my @parts = grep { $_->{size} > MB(2) || !isEmpty($_) } @all_parts; + my $ratio = $totalsectors ? ($width - @parts * $minwidth) / $totalsectors : 1; my $i = 1; while ($i < 30) { |