mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +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:
parent
28241f25dc
commit
21c647dd75
Notes:
sideshowbarker
2024-07-17 11:11:21 +09:00
Author: https://github.com/MacDue
Commit: 21c647dd75
Pull-request: https://github.com/SerenityOS/serenity/pull/13868
Reviewed-by: https://github.com/linusg
2 changed files with 32 additions and 0 deletions
|
@ -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&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue