Use QMargins to store margins and measures. As a side effect of this
diff, updateSizes and contentGeometry are more simpler now,
which is good, I guess.
Details
Details
- Reviewers
- None
- Group Reviewers
Plasma Frameworks
Diff Detail
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Branch
- framesvg-modernize
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
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();