From 73017b4e9a6c1554335d507fcd56888a434e0b1a Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 20 Aug 2002 13:46:02 +0000 Subject: try to use a "typical width" to set the maximum size of the packages column, rather than pure hardcoding --- rpmdrake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rpmdrake b/rpmdrake index f1055994..1ba2923f 100755 --- a/rpmdrake +++ b/rpmdrake @@ -324,8 +324,10 @@ or you already installed all of them.")); $::noBorder = 0; $tree = Gtk::CTree->new(3, 0); $tree->set_selection_mode('browse'); - $tree->set_column_auto_resize($_, 1) foreach 1..2; - $tree->set_column_width(0, 260); + $tree->set_column_auto_resize($_, 1) foreach 0..2; + my $typical_width = $tree->get_style->font->string_width("Develop xmms-more-vis-plugins-1.6.0.0-2mdk"); + $typical_width > 500 and $typical_width = 500; #- try to not being crazy with a too large value + $tree->set_column_max_width(0, $typical_width); $tree->signal_connect(tree_select_row => sub { $disable_treeselect_callback and return; if (!$_[1]->row->is_leaf && !$_[1]->row->children) { @@ -498,7 +500,7 @@ Is it ok to continue?", $formatlistpkg->(sort { $a cmp $b } keys %{$urpm->{state 0; }); - $w->{window}->set_usize(660, 500); + $w->{window}->set_usize($typical_width*2.7, 500); $w->{rwindow}->show_all; my $widgets = { w => $w, tree => $tree, info => $info, status => $status}; -- cgit v1.2.1