diff --git a/ui/rp_widget.h b/ui/rp_widget.h index f1260b9..4095c2d 100644 --- a/ui/rp_widget.h +++ b/ui/rp_widget.h @@ -54,6 +54,9 @@ public: y -= margins.top(); Base::move(style::RightToLeft() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()), y); } + void setGeometryToLeft(const QRect &r, int outerw = 0) { + setGeometryToLeft(r.x(), r.y(), r.width(), r.height(), outerw); + } void setGeometryToLeft(int x, int y, int w, int h, int outerw = 0) { auto margins = getMargins(); x -= margins.left(); @@ -62,6 +65,9 @@ public: h -= margins.top() - margins.bottom(); Base::setGeometry(style::RightToLeft() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w) : x, y, w, h); } + void setGeometryToRight(const QRect &r, int outerw = 0) { + setGeometryToRight(r.x(), r.y(), r.width(), r.height(), outerw); + } void setGeometryToRight(int x, int y, int w, int h, int outerw = 0) { auto margins = getMargins(); x -= margins.right();