mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:28:13 +00:00
GWidget: Add move_by() and make set_relative_rect() invalidate parent.
This commit is contained in:
parent
486ed41fd2
commit
ac324f14b8
2 changed files with 8 additions and 0 deletions
|
@ -112,6 +112,9 @@ public:
|
|||
void resize(const Size& size) { set_relative_rect({ relative_rect().location(), size }); }
|
||||
void resize(int width, int height) { resize({ width, height }); }
|
||||
|
||||
void move_by(int x, int y) { move_by({ x, y }); }
|
||||
void move_by(const Point& delta) { set_relative_rect({ relative_position().translated(delta), size() }); }
|
||||
|
||||
Color background_color() const { return m_background_color; }
|
||||
Color foreground_color() const { return m_foreground_color; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue