D8243: Implement support for categories on KfilesPlacesView

Anthony Fieroni noreply at phabricator.kde.org
Thu Oct 12 19:17:38 UTC 2017


anthonyfieroni added inline comments.

INLINE COMMENTS

> kfileplacesview.cpp:169
> +        // if is drawing the floating element used by drag/drop, does not draw the header
> +        if (m_dragModeCount == 0) {
> +            drawSectionHeader(painter, opt, index);

Why you are sure that m_dragModeCount is 0 when indexIsSectionHeader? Why not when index.row() == 0 we can paint section header?

> kfileplacesview.cpp:1150
>      const int maxWidth = q->viewport()->width() - textWidth - 4 * margin - 1;
> -    const int maxHeight = ((q->height() - (fm.height() / 2) * rowCount) / rowCount) - 1;
> +    int maxHeight = ((q->height() - (fm.height() / 2) * rowCount) / rowCount) - 1;
> +    maxHeight += sectionsCount() * fm.height();

This calculation makes no sense to me. We have ((x - (y/2) * rowCount) / rowCount so rowCount can be removed no?

REPOSITORY
  R241 KIO

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

To: renatoo, #frameworks, dfaure, ervin
Cc: mlaurent, ervin, anthonyfieroni, cfeck, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171012/bd2c6b0c/attachment.html>


More information about the Kde-frameworks-devel mailing list