diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-20 13:46:02 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-20 13:46:02 +0000 |
commit | 73017b4e9a6c1554335d507fcd56888a434e0b1a (patch) | |
tree | 67820c53a304ca0579244a6f3bb197b6e4937c80 | |
parent | 6be2d226a76992a529282abe4d309ce1286f2453 (diff) | |
download | rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.gz rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.bz2 rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.xz rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.zip |
try to use a "typical width" to set the maximum size of the
packages column, rather than pure hardcoding
-rwxr-xr-x | rpmdrake | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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}; |