mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibGUI: Add on_theme_change callback to Application
This allows an Application without a window to listen for theme changes.
This commit is contained in:
parent
84780f3ed5
commit
535e1c9152
Notes:
sideshowbarker
2024-07-17 20:58:35 +09:00
Author: https://github.com/networkException
Commit: 535e1c9152
Pull-request: https://github.com/SerenityOS/serenity/pull/14305
Reviewed-by: https://github.com/linusg ✅
3 changed files with 7 additions and 0 deletions
|
@ -311,6 +311,10 @@ void Application::event(Core::Event& event)
|
|||
on_action_leave(action);
|
||||
}
|
||||
}
|
||||
if (event.type() == GUI::Event::ThemeChange) {
|
||||
if (on_theme_change)
|
||||
on_theme_change();
|
||||
}
|
||||
Object::event(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue