summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-10-08 16:18:19 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-10-08 16:18:19 +0000
commit047d38213790fb33d2fe9f1c3165f40eacae28a3 (patch)
tree6f544809239750d69272f636f48e0b336fee404b /perl-install/fs
parent6771e4934cbdd1de480f662b34e9b5f4c5bb9417 (diff)
downloaddrakx-047d38213790fb33d2fe9f1c3165f40eacae28a3.tar
drakx-047d38213790fb33d2fe9f1c3165f40eacae28a3.tar.gz
drakx-047d38213790fb33d2fe9f1c3165f40eacae28a3.tar.bz2
drakx-047d38213790fb33d2fe9f1c3165f40eacae28a3.tar.xz
drakx-047d38213790fb33d2fe9f1c3165f40eacae28a3.zip
prevent cursor to go under needed size because of rounding
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/partitioning_wizard.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index f8030d83d..5c1e81b36 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -12,6 +12,7 @@ use fs::mount_point;
use partition_table;
use partition_table::raw;
use partition_table::dos;
+use POSIX qw(ceil);
#- unit of $mb is mega bytes, min and max are in sectors, this
#- function is used to convert back to sectors count the size of
@@ -310,7 +311,7 @@ sub create_display_box {
}
if($resize && $part && !$desc) {
$ev->set_name("PART_vfat");
- $w->set_size_request($ratio * $part->{min_win}, 0);
+ $w->set_size_request(ceil($ratio * $part->{min_win}), 0);
my $ev2 = Gtk2::EventBox->new();
my $b2 = Gtk2::Label->new("");
$ev2->add($b2);
@@ -322,7 +323,7 @@ sub create_display_box {
$hpane->child1_shrink(0);
$hpane->add2($ev2);
$hpane->child2_shrink(0);
- $hpane->set_position($ratio * $part->{min_win});
+ $hpane->set_position(ceil($ratio * $part->{min_win}));
ugtk2::gtkset_size_request($hpane, $ratio * $part->{size}, 30);
ugtk2::gtkpack__($display_box, $hpane);