summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksplash17
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;
});
});