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
commit b40d771512
Notes: sideshowbarker 2024-07-18 09:12:36 +09:00
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)