diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h index d7050b4734..789a025d08 100644 --- a/LibGUI/GWidget.h +++ b/LibGUI/GWidget.h @@ -100,6 +100,11 @@ public: void set_relative_rect(const Rect&); void set_relative_rect(int x, int y, int width, int height) { set_relative_rect({ x, y, width, height }); } + void set_x(int x) { set_relative_rect(x, y(), width(), height()); } + void set_y(int y) { set_relative_rect(x(), y, width(), height()); } + void set_width(int width) { set_relative_rect(x(), y(), width, height()); } + void set_height(int height) { set_relative_rect(x(), y(), width(), height); } + void move_to(const Point& point) { set_relative_rect({ point, relative_rect().size() }); } void move_to(int x, int y) { move_to({ x, y }); } void resize(const Size& size) { set_relative_rect({ relative_rect().location(), size }); }