summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-29 09:59:23 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-29 09:59:23 +0000
commit38ae44f66206176f7f7ca33874de04dc95428ccc (patch)
treec06e8d844f09b5fe40baf07a7dcf08bf824a6097 /perl-install/mygtk2.pm
parent9ace91446fdff67650d771f3fd1daf6d409d7fc6 (diff)
downloaddrakx-38ae44f66206176f7f7ca33874de04dc95428ccc.tar
drakx-38ae44f66206176f7f7ca33874de04dc95428ccc.tar.gz
drakx-38ae44f66206176f7f7ca33874de04dc95428ccc.tar.bz2
drakx-38ae44f66206176f7f7ca33874de04dc95428ccc.tar.xz
drakx-38ae44f66206176f7f7ca33874de04dc95428ccc.zip
(_gtk__Image_using_pixbuf) simplify using pixbuf storage (which brings in
optimized refresh on expose event as side effect) (needed for next commit)
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm12
1 files changed, 1 insertions, 11 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index f218778bf..8f5ea596f 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -330,17 +330,7 @@ sub _gtk__Image {
} : $class =~ /using_pixbuf/ ? sub {
my ($w, $file) = @_;
my $pixbuf = _pixbuf_render_alpha(gtknew('Pixbuf', file => $file, %{$w->{options}}), 255);
- my ($width, $height) = ($pixbuf->get_width, $pixbuf->get_height);
- $w->set_size_request($width, $height);
- $w->signal_connect(expose_event => sub {
- if (!$w->{x}) {
- my $alloc = $w->allocation;
- $w->{x} = $alloc->x;
- $w->{y} = $alloc->y;
- }
- $pixbuf->render_to_drawable($w->window, $w->style->fg_gc('normal'),
- 0, 0, $w->{x}, $w->{y}, $width, $height, 'max', 0, 0);
- });
+ $w->set_from_pixbuf($pixbuf);
} : sub {
my ($w, $file, $o_size) = @_;
my $pixbuf = gtknew('Pixbuf', file => $file, if_($o_size, size => $o_size), %{$w->{options}});