diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-19 16:14:09 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-19 16:14:09 +0000 |
commit | a550b67fcd217af0799b15e39b1feb2cba4db60e (patch) | |
tree | 7e58ed857b6e3ef682dab12e0955529ac31c876f /perl-install | |
parent | ec640ad9442a3581ff925177a66e7fa56db36558 (diff) | |
download | drakx-backup-do-not-use-a550b67fcd217af0799b15e39b1feb2cba4db60e.tar drakx-backup-do-not-use-a550b67fcd217af0799b15e39b1feb2cba4db60e.tar.gz drakx-backup-do-not-use-a550b67fcd217af0799b15e39b1feb2cba4db60e.tar.bz2 drakx-backup-do-not-use-a550b67fcd217af0799b15e39b1feb2cba4db60e.tar.xz drakx-backup-do-not-use-a550b67fcd217af0799b15e39b1feb2cba4db60e.zip |
(reate_box_with_title) shrink TextView size to its minimal size in
order to get the bigger place for other widgets
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ugtk2.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 6dc7bbd9f..d5e680a82 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -317,7 +317,15 @@ sub create_box_with_title { $wtext->signal_connect(button_press_event => sub { 1 }); #- disable selecting text and popping the contextual menu (GUI team says it's *horrible* to be able to do select text!) chomp(my $text = join("\n", @_)); my $scroll = create_scrolled_window(gtktext_insert($wtext, $text)); - $scroll->set_size_request(400, $o->{box_size}); + my $width = 400; + $scroll->signal_connect(realize => sub { + my $layout = $wtext->create_pango_layout ($text); + $layout->set_width(($width - 10) * Gtk2::Pango->scale); + $wtext->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10)); + $scroll->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10)); + $o->{rwindow}->queue_resize; + }); + $scroll->set_size_request($width, 200); gtkpack_($box, 0, $scroll); } else { my $a = !$::no_separator; |