From e939764c1c13713245b9ef169e02dfda5487c4e7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 24 Sep 2002 15:22:23 +0000 Subject: from dams: remove his ugly hack for mcc which altered the scrolledwindow's "bordure" to hide it. this used to be done through a gtk timer (hance the ugly flash on first display of notebook pages) now createScrolledWindow take a new optional argument that enable to hide the border the right way thanks dams --- perl-install/ugtk.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index 5c32c178d..f324ca0c6 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -359,13 +359,16 @@ sub create_packtable { } sub createScrolledWindow { - my ($W, $policy) = @_; + my ($W, $policy, $viewport_shadow) = @_; my $w = new Gtk::ScrolledWindow(undef, undef); $policy ||= [ 'automatic', 'automatic']; $w->set_policy(@{$policy}); - member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text)) ? - $w->add($W) : - $w->add_with_viewport($W); + if(member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text))) { + $w->add($W) + } else { + $w->add_with_viewport($W); + $viewport_shadow and gtkset_shadow_type($w->child, $viewport_shadow); + } $W->can("set_focus_vadjustment") and $W->set_focus_vadjustment($w->get_vadjustment); $W->show; $w @@ -601,7 +604,7 @@ sub gtkicons_labels_widget { my $fixed = new Gtk::Fixed; foreach (@tab) { $fixed->put($_, 75, 65) } my $is_resized = 0; - my $w_ret = createScrolledWindow($fixed, ['automatic', 'automatic']); + my $w_ret = createScrolledWindow($fixed, undef, 'none'); my $redraw_function; $redraw_function = sub { if ($is_resized == 0) { @@ -622,7 +625,7 @@ sub gtkicons_labels_widget { $fixed->{redraw_function} = $redraw_function; $w_ret->vscrollbar->set_usize(19, undef); - gtkhide(gtkset_border_width($w_ret, -2)); #- ok, this is very very ugly... + gtkhide($w_ret); } sub n_line_size { -- cgit v1.2.1