From fadc8b97ed98977bf264d87d62c33e779f299716 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 6 Nov 2013 18:32:25 +0100 Subject: fix retrieving allocated size --- perl-install/mygtk3.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index c41320b15..24cafc46f 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -790,7 +790,7 @@ sub _gtk__MDV_Notebook { $w->signal_connect('size-allocate' => sub { my (undef, $requisition) = @_; state $width ||= $right_bg_width; - $box->set_size_request($width, $requisition->height); + $box->set_size_request($width, $requisition->{height}); }); $_->set_property('no-show-all', 1) foreach $selection_bar, $selection_arrow; bless($w, 'Gtk3::MDV_Notebook'); @@ -1320,7 +1320,7 @@ sub _create_Window { my ($wi, $he); $w->signal_connect(size_allocate => sub { my (undef, $event) = @_; - my @w_size = $event->values; + my @w_size = @$event{qw(height width)}; # ignore bogus sizing events: return if $w_size[2] < 5; @@ -1635,7 +1635,7 @@ sub move_selection { my $layout = $w->{layout}; $layout->{arrow_ydiff} ||= ($w->{selection_arrow}->get_pixbuf->get_height - $w->{selection_bar}->get_pixbuf->get_height)/2; - my $bar_y = $label->get_allocation->y - ($w->{selection_bar}->get_pixbuf->get_height - $label->allocation->height)/2; + my $bar_y = $label->get_allocation->{y} - ($w->{selection_bar}->get_pixbuf->get_height - $label->get_allocation->{height})/2; $layout->move($w->{selection_bar}, 0, $bar_y); $layout->move($w->{selection_arrow}, $w->{arrow_x}, $bar_y - $layout->{arrow_ydiff}); # arrow is higer $_->show foreach $w->{selection_bar}, $w->{selection_arrow}; -- cgit v1.2.1