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

LibGUI: Add FontsChanged event and deliver it to windows and widgets

This commit is contained in:
LuK1337 2021-07-12 09:57:34 +02:00 committed by Andreas Kling
parent 9318d9f284
commit b40d771512
7 changed files with 39 additions and 0 deletions

View file

@ -72,6 +72,9 @@ void WindowServerConnection::update_system_fonts(const String& default_font_quer
Gfx::FontDatabase::set_default_font_query(default_font_query);
Gfx::FontDatabase::set_fixed_width_font_query(fixed_width_font_query);
Window::update_all_windows({});
Window::for_each_window({}, [](auto& window) {
Core::EventLoop::current().post_event(window, make<FontsChangeEvent>());
});
}
void WindowServerConnection::paint(i32 window_id, Gfx::IntSize const& window_size, Vector<Gfx::IntRect> const& rects)