summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draksplash10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index c5dc3a2ef..d43080708 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -478,14 +478,13 @@ sub set_thm_values() {
}
-my ($prev_pic, $prev_pix, $prev_canvas);
+my ($prev_pic, $prev_canvas);
#- Desc => destroy properly all widget of preview window
sub kill_preview() {
$prev_window->destroy; undef($prev_window);
$prev_canvas->destroy; undef($prev_canvas);
undef($prev_pic);
- undef($prev_pix);
}
#- Desc => create a new window with a preview of splash screen
#- Args => $img_file (str) full path to preview file
@@ -497,12 +496,13 @@ sub show_prev {
$prev_window->set_title(N("%s BootSplash (%s) preview", $theme{name}, $theme{res}{res}));
$prev_pic = gtkcreate_pixbuf($img_file);
$prev_pic->scale_simple($theme{res}{w}, $theme{res}{h}, 'hyper');
- $prev_pix = $prev_pic->render_pixmap_and_mask($prev_pic);
$prev_canvas && $prev_canvas->isa('Gtk2::Widget')
or $prev_canvas = new Gtk2::DrawingArea() and $prev_window->add($prev_canvas);
$prev_canvas->set_size_request($theme{res}{w}, $theme{res}{h});
- $prev_canvas->signal_connect(expose_event => sub {
- $prev_pic->render_to_drawable($prev_canvas->window, $prev_canvas->style->fg_gc('normal'),0,0,0,0, $theme{res}{w}, $theme{res}{h}, 'normal', 0, 0);
+ $prev_canvas->signal_connect(expose_event => sub {
+ my ($w, $event) = @_;
+ my ($x, $y, $width, $height) = $event->area->values;
+ $prev_pic->render_to_drawable($w->window, $w->style->fg_gc('normal'), $x, $y, $x, $y, $width, $height, 'normal', 0, 0);
$prev_canvas->window->draw_rectangle($prev_canvas->style->black_gc, $true,$txt_tl_x, $txt_tl_y,$txt_width,$txt_height);
$prev_canvas->window->draw_rectangle($prev_canvas->style->black_gc, $true, $prog_tl_x,$prog_tl_y,$prog_width, $prog_height);
});