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

LibGUI: Add Window::constrain_to_desktop() helper

And a center_within(IntRect const&) overload
This commit is contained in:
thankyouverycool 2023-05-13 05:06:46 -04:00 committed by Andreas Kling
parent 2d64147f02
commit dfe06096c7
2 changed files with 25 additions and 0 deletions

View file

@ -129,7 +129,10 @@ public:
void resize(Gfx::IntSize size) { set_rect({ position(), size }); }
void center_on_screen();
void constrain_to_desktop();
void center_within(Window const&);
void center_within(Gfx::IntRect const&);
virtual void event(Core::Event&) override;