D13285: FrameSVG: Use QMargins

Vlad Zagorodniy noreply at phabricator.kde.org
Sun Jun 3 12:06:26 UTC 2018


zzag added a comment.


  I'm not sure whether that's a good idea to use QMargins for measures, maybe, it would be better to have something like
  
    struct {
        QSize left;
        QSize top;
        QSize right;
        QSize bottom;
    } sizes, fixedSizes;
  
  in FrameData, which then should go in a different diff (if you think it's worth it).
  
  Also, I think it will simplify generateFrameBackground a little bit, e.g.
  
    paintBorder(p, frame, FrameSvg::RightBorder, frame->sizes.right * q->devicePixelRatio, contentRect);
  
  so there won't be a need for `const int leftHeight = q->elementSize(frame->prefix % QLatin1String("left")).height();`

REPOSITORY
  R242 Plasma Framework (Library)

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

To: zzag, #plasma, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180603/61f8a8c7/attachment.html>


More information about the Kde-frameworks-devel mailing list