Added helpful function to convert padding into top-left point.

This commit is contained in:
23rd 2024-03-07 02:43:45 +03:00 committed by John Preston
parent 1587f9f1b9
commit edfcac751d

View file

@ -39,6 +39,22 @@ namespace sum {
} }
} // namespace sum } // namespace sum
namespace pos {
/*
Top-left.
rect::m::pos::tl(mypadding);
*/
[[nodiscard]] inline QPoint tl(const QMargins &margins) {
return { margins.left(), margins.top() };
}
[[nodiscard]] inline QPointF tl(const QMarginsF &margins) {
return { margins.left(), margins.top() };
}
} // namespace pos
} // namespace m } // namespace m
/* /*