D18380: KIO: make file dialog columns resizable again (and movable)

René J.V. Bertin noreply at phabricator.kde.org
Tue Jan 22 22:37:55 GMT 2019


rjvbb updated this revision to Diff 50083.
rjvbb added a comment.


  Well, that was "interesting".
  
  It turns out that Qt has what looks like another path through which section sizes are calculated and through which they're shown, which apparently isn't used in file dialogs but which sometimes gets used when the detail view widget is used in a (Kate) side-bar. That path could give (much) smaller name column sizes than the designated minimum but also somewhat larger sizes. All this led to the "jarring effect" seen in Nate's video, which did not have anything to do with the font  being squeezed.
  
  I've been able to catch the smaller sizes by subclassing `QHeaderView` and overriding `sectionSizeFromContents()` and by calling `QTreeView::resizeColumnToContents(0)` when resizing; when a larger name column width is determine while in "narrow mode" that value now becomes the designated minimum so that the column doesn't "hesitate" between the 2 values (more than once).
  Calling `QTreeView::resizeColumnToContents` can reduce resizing reactivity noticeably so the call is omitted when the widget is used in a file dialog
  
  The font squeezing feature has been dropped.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18380?vs=50032&id=50083

REVISION DETAIL
  https://phabricator.kde.org/D18380

AFFECTED FILES
  src/filewidgets/kdiroperatordetailview.cpp
  src/filewidgets/kdiroperatordetailview_p.h

To: rjvbb, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190122/3ce43c61/attachment.html>


More information about the Kde-frameworks-devel mailing list