From 75e462557cd824504f8a5b7c713924bf8e52cfa2 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 20 Aug 2007 20:13:36 +0000 Subject: allow to specify size when creating pixbufs and images --- perl-install/ugtk2.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index d156bc03d..fe20ca05a 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -605,12 +605,14 @@ sub _find_imgfile { # use it if you want to display an icon/image in your app sub gtkcreate_img { - gtknew('Image', file => $_[0]); + my ($file, $o_size) = @_; + gtknew('Image', file => $file, if_($o_size, size => $o_size)); } # use it if you want to draw an image onto a drawingarea sub gtkcreate_pixbuf { - gtknew('Pixbuf', file => $_[0]); + my ($file, $o_size) = @_; + gtknew('Pixbuf', file => $_[0], if_($o_size, size => $o_size)); } sub gtktext_append { gtktext_insert(@_, append => 1) } -- cgit v1.2.1