From 7837c6fe4a41072357177c33fc47380a44aea78c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Nov 2013 01:40:16 +0100 Subject: get_width() => get_allocated_width() --- lib/mouse.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/mouse.pm') diff --git a/lib/mouse.pm b/lib/mouse.pm index 23310ea..51de483 100644 --- a/lib/mouse.pm +++ b/lib/mouse.pm @@ -578,7 +578,7 @@ sub test_mouse { up => 'arrow_up', down => 'arrow_down'); my %images = map { $_ => ugtk3::gtkcreate_pixbuf("$image_files{$_}.png") } keys %image_files; - my $width = $images{mouse}->get_width; + my $width = $images{mouse}->get_allocated_width; my $height = round_up($images{mouse}->get_allocated_height, 6); my $draw_text = sub { @@ -592,7 +592,7 @@ sub test_mouse { }; my $draw_pixbuf = sub { my ($p, $x, $y, $w, $h) = @_; - $w = $p->get_width; + $w = $p->get_allocated_width; $h = $p->get_allocated_height; $p->render_to_drawable($darea->get_window, $darea->get_style->bg_gc('normal'), 0, 0, ($darea->get_allocation->width-$width)/2 + $x, ($darea->get_allocation->height-$height)/2 + $y, -- cgit v1.2.1