1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

Launcher: Factor the app buttons into a LaunchButton class.

Added some LibGUI helpers while I'm at it.
This commit is contained in:
Andreas Kling 2019-02-08 00:14:37 +01:00
parent bf766fc12c
commit 6d7f000ffc
5 changed files with 39 additions and 36 deletions

View file

@ -56,7 +56,11 @@ public:
virtual const char* class_name() const override { return "GWidget"; }
void set_relative_rect(const Rect&);
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 }); }
void resize(int width, int height) { resize({ width, height }); }
Color background_color() const { return m_background_color; }
Color foreground_color() const { return m_foreground_color; }