D12149: Improve grid spacing in icons-on-top mode for open/save dialogs

Henrik Fehlauer noreply at phabricator.kde.org
Fri Apr 13 21:09:06 UTC 2018


rkflx added a comment.


  Ok, forget about Dolphin, which for small sizes IMO could be much more dense than it is now.
  
  However, can we still tweak the file dialog a bit?
  
  My issue is that between 16px and 72px there is absolutely no change in both the number of characters displayed, as well as the number of columns for a given window width (best tested with a `abcdefghijklmnopqrstuvwxyz1234567890` folder name). The purpose of the slider is not to only control the vertical density and the icons size, but also be able to change the horizontal density.
  
  Obviously the old behaviour led to too many linebreaks for small sizes, but a better compromise for me would be to use `* 5.5` instead of `* 6`. This way you'll lose roughly 3 characters, but move the limit down to 64px. As a nice side effect, you'll fit 5 columns instead of 4 for the default window size and with 32px icons.
  
  Apart from that, I really tried to break it, but failed. Well done!
  
  ---
  
  Code mostly LGTM.

INLINE COMMENTS

> kdiroperator.cpp:2591
> +        const int minWidth = metrics.height() * 6;
> +        const QSize itemSize = QSize(qMax(minWidth, width), height);
> +        view->setGridSize(itemSize);

You could avoid repeating `QSize`:

  const QSize itemSize(qMax(minWidth, width), height);

Alternatively use `auto`.

REPOSITORY
  R241 KIO

BRANCH
  tighter-grid-in-icons-view (branched from master)

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

To: ngraham, #frameworks, #vdg, rkflx, abetts
Cc: abetts, cfeck, alexeymin, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180413/a1b7606f/attachment.html>


More information about the Kde-frameworks-devel mailing list