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

LibGUI: Add center_window_group_within() to AbstractThemePreview

This method will center a group of window rects, within some
bounds, accounting for the properties of the currently selected theme
(i.e. border width, title height, etc).
This commit is contained in:
MacDue 2022-05-01 15:45:14 +01:00 committed by Linus Groh
parent 28241f25dc
commit 21c647dd75
2 changed files with 32 additions and 0 deletions

View file

@ -31,6 +31,11 @@ public:
Function<void(String const&)> on_theme_load_from_file;
Function<void()> on_palette_change;
struct Window {
Gfx::IntRect& rect;
};
void center_window_group_within(Span<Window> windows, Gfx::IntRect const& bounds);
protected:
explicit AbstractThemePreview(Gfx::Palette const&);