https://bugzilla.novell.com/show_bug.cgi?id=441828
User schaefer.frank@gmx.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=441828#c17
--- Comment #17 from Frank Schäfer 2009-02-08 10:54:01 MST ---
Created an attachment (id=271070)
--> (https://bugzilla.novell.com/attachment.cgi?id=271070)
Another patch for discussion
I've found some time this weekend to take a look at this issue:
First of all: thank you Marian for your patch. I've tested it and it works
without problems, the results are OK for me.
But I guess the main problem with this patch is, that it might be a bit too
complicated. It adds much code, which then has to be maintained by
Stefan...(Stefan, tell us the truth ;-) ).
However, I've written another (simpler) patch for discussion:
It adds a new function YQPkgList::optimizeColumnWidths() and calls it each time
a package is added to the list (YQPkgList::addPkgItem(...)). It does the
following:
1.) get optimal widths by setting them with
QTreeView::resizeColumnToContents(...)
2.) determines visible width of the Widget
3.) calculates difference of both values
4.) optimizes column widths according to the following strategy:
- distribute overhead space to all columns (except the
status-icon-columns), if we have more space than we need
=> +: looks much better
=> -: we waste space when the window is resized (to a smaller
width), because there is currently no column width adjustment/optimization on
resize-events
- reduces width of the "summary"-column (there is a lower limit), if we
have less space than we need; if that is not enough, we will get a horizontal
scrollbar
Step 4.) is of course discussable. It should be easy to experiment with it (see
code comments).
Please tell me what you think about it, so that we can solve this annoying
issue soon.
Frank
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.