diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-05-03 08:36:28 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-05-03 08:36:28 +0000 |
commit | 51f8b99e7bc341b8f0b599fd359bd3472789ccb5 (patch) | |
tree | 226815d095d624f6cf9a5429123c4f640342a59b /perl-install/standalone/draksplash | |
parent | ceed125b764420edfa4f4a3b6c564874e7b15bdf (diff) | |
download | drakx-backup-do-not-use-51f8b99e7bc341b8f0b599fd359bd3472789ccb5.tar drakx-backup-do-not-use-51f8b99e7bc341b8f0b599fd359bd3472789ccb5.tar.gz drakx-backup-do-not-use-51f8b99e7bc341b8f0b599fd359bd3472789ccb5.tar.bz2 drakx-backup-do-not-use-51f8b99e7bc341b8f0b599fd359bd3472789ccb5.tar.xz drakx-backup-do-not-use-51f8b99e7bc341b8f0b599fd359bd3472789ccb5.zip |
remove ugly dec2hex
Diffstat (limited to 'perl-install/standalone/draksplash')
-rwxr-xr-x | perl-install/standalone/draksplash | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash index da027d73a..9310e8c95 100755 --- a/perl-install/standalone/draksplash +++ b/perl-install/standalone/draksplash @@ -418,20 +418,6 @@ sub mk_frame { @buttons); } -#- Desc => take a decimal value between 0 to 255 and return the corresponding hexadecimal value -sub dec2hex { - my ($dec) = @_; - my @dec_hex = (0..9, 'A', 'B', 'C', 'D', 'E', 'F'); - my $int; - my $float; - $dec = $dec/16; - $int = int($dec); - $float = $dec_hex[int(($dec-$int)*16)]; - $int = $dec_hex[$int]; - - return "$int$float"; -} - #- Desc => prepare and set all signal_connect for boot_frame widget sub make_boot_frame() { $boot_conf_frame{frame}->add(mk_frame(\%boot_conf_frame)); @@ -444,8 +430,7 @@ sub make_boot_frame() { $color->cancel_button->signal_connect(clicked => sub { $color->destroy }); $color->ok_button->signal_connect(clicked => sub { my $colour = $color->colorsel->get_current_color; - @rgb = map { dec2hex($_*255) } ($colour->red, $colour->green, $colour->blue); - $theme{boot_conf}{pc} = "0x$rgb[0]$rgb[1]$rgb[2]"; + $theme{boot_conf}{pc} = "0x" . join('', map { print "$_\n"; sprintf("%x", $_*255) } $colour->red, $colour->green, $colour->blue); $color->destroy; }); }); |