Patch for KDirOperator: make columns in detailled view resizable

Peter Penz peter.penz at gmx.at
Thu Oct 4 08:46:34 BST 2007


Hi Anders,

> On Thursday 04 October 2007, Peter Penz wrote:
> > Your patch did no automatic resizing when opening in the means of that
> the
> > name column gets as much width as possible. The workaround with
> > model()->rows() > 0 did also not work when opening the file-dialog the
> > second time, as the resizing is done too early then... (so the size of
> the
> > columns differed dependent whether the model is in the cache or not)
> 
> Is the file dialogs kept (as opposite to deleted) between uses??

No, the file-dialog is deleted. Without having debugged this in detail: I assume that the KDirLister (used by KDirModel) still has the items in its global cache, which leads to having model()->rows() > 0 already one or two resize events earlier. In these earlier resize events the width of the viewport does not have the final width yet -> any calculation which tries to stretch a column based on the available viewport width will fail as we ignore further updates because model()->rows() > 0 is true now...

With your original patch the differences between opening the file-dialog the first and second time are very subtle, as the autoresizing is used which ignores the viewport width (still there might be differences if an incremental loading is done where a very long file name is loaded later).

Before this gets an "academic discussion": I'd say lets get in your original patch on Friday. If I have time to find a solution to differ between a user resized column resizing and an internal resizing in a clean manner, then we don't have the problem above anymore as we don't rely on the model()->rows() > 0 workaround anymore.

Best regards,
Peter




More information about the kde-core-devel mailing list