From f71923b96a936c78b6387222e7c93a654d31536a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Nov 2013 01:37:44 +0100 Subject: get_height() => get_allocated_height() --- lib/Xconfig/test.pm | 2 +- lib/mouse.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Xconfig/test.pm b/lib/Xconfig/test.pm index 36b0e30..2bdd7cc 100644 --- a/lib/Xconfig/test.pm +++ b/lib/Xconfig/test.pm @@ -114,7 +114,7 @@ sub test { my $root = gtkroot(); my $gc = Gtk3::Gdk::GC->new($root); my $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file("$::prefix/usr/share/mga/xfdrake/xfdrake-test-card.png"); - my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_height); + my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_allocated_height); my $pixmap = Gtk3::Gdk::Pixmap->new($root, $w, $h, $root->get_depth); $pixbuf->render_to_drawable($pixmap, $gc, 0, 0, 0, 0, $w, $h, 'none', 0, 0); $root->set_back_pixmap($pixmap, 0); diff --git a/lib/mouse.pm b/lib/mouse.pm index 0c76659..d57922e 100644 --- a/lib/mouse.pm +++ b/lib/mouse.pm @@ -579,7 +579,7 @@ sub test_mouse { down => 'arrow_down'); my %images = map { $_ => ugtk3::gtkcreate_pixbuf("$image_files{$_}.png") } keys %image_files; my $width = $images{mouse}->get_width; - my $height = round_up($images{mouse}->get_height, 6); + my $height = round_up($images{mouse}->get_allocated_height, 6); my $draw_text = sub { my ($t, $y) = @_; @@ -593,7 +593,7 @@ sub test_mouse { my $draw_pixbuf = sub { my ($p, $x, $y, $w, $h) = @_; $w = $p->get_width; - $h = $p->get_height; + $h = $p->get_allocated_height; $p->render_to_drawable($darea->get_window, $darea->style->bg_gc('normal'), 0, 0, ($darea->get_allocation->width-$width)/2 + $x, ($darea->get_allocation->height-$height)/2 + $y, $w, $h, 'none', 0, 0); @@ -637,7 +637,7 @@ sub test_mouse { if ($nb == 3) { $draw_pixbuf->($images{up}, $x+6, $y-10); } elsif ($nb == 4) { - $draw_pixbuf->($images{down}, $x+6, $y + $images{middle}->get_height + 2); + $draw_pixbuf->($images{down}, $x+6, $y + $images{middle}->get_allocated_height + 2); } $draw_by_name->('middle'); $timeout and Glib::Source->remove($timeout); -- cgit v1.2.1