diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-08 09:04:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-08 09:04:13 +0000 |
commit | f45cf1bf38126501a2b0cf4a17cfea37a72f919f (patch) | |
tree | d9426471721b9684a63a5115583741f405cc9926 /perl-install/standalone/draksplash | |
parent | 9e01ec9a6633ca87c4910cbb68736ca45bcf49f4 (diff) | |
download | drakx-f45cf1bf38126501a2b0cf4a17cfea37a72f919f.tar drakx-f45cf1bf38126501a2b0cf4a17cfea37a72f919f.tar.gz drakx-f45cf1bf38126501a2b0cf4a17cfea37a72f919f.tar.bz2 drakx-f45cf1bf38126501a2b0cf4a17cfea37a72f919f.tar.xz drakx-f45cf1bf38126501a2b0cf4a17cfea37a72f919f.zip |
(show_prev) only redraw needed part, not whole image
Diffstat (limited to 'perl-install/standalone/draksplash')
-rwxr-xr-x | perl-install/standalone/draksplash | 10 |
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); }); |