diff options
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 2c97dad0e..9fd5fe589 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -14,7 +14,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $force_center $force_focus gtkhide gtkdestroy gtkflush gtkset_mousecursor gtkset_mousecursor_normal gtkset_markup gtkset_mousecursor_wait gtkappend_text gtkprepend_text gtkinsert_text gtkroot gtksetstyle) ], helpers => [ qw(add2notebook add_icon_path n_line_size fill_tiled fill_tiled_coords string_size - get_text_coord gtkcolor gtkset_background gtkfontinfo gtkcreate_img gtkcreate_pixbuf) ], + get_text_coord gtkcolor gtkset_background gtkfontinfo gtkcreate_img gtkcreate_pixbuf set_back_pixbuf) ], create => [ qw(create_box_with_title create_adjustment create_scrolled_window create_hbox create_vbox create_dialog destroy_window create_factory_menu create_menu create_notebook create_packtable create_vpaned create_hpaned create_okcancel) ], @@ -533,6 +533,15 @@ sub gtkfontinfo { %fontinfo; } +sub set_back_pixbuf { + my ($widget, $pixbuf) = @_; + my $window = $widget->window; + my ($width, $height) = ($pixbuf->get_width, $pixbuf->get_height); + my $pixmap = Gtk2::Gdk::Pixmap->new($window, $width, $height, $window->get_depth); + $pixbuf->render_to_drawable($pixmap, $widget->style->fg_gc('normal'), 0, 0, 0, 0, $width, $height, 'none', 0, 0); + $window->set_back_pixmap($pixmap, 0); +} + sub fill_tiled_coords { my ($widget, $pixbuf, $x_back, $y_back, $width, $height) = @_; my ($x2, $y2) = (0, 0); |