LibGUI: Add Window::on_font_change() hook

This commit is contained in:
thankyouverycool
2023-04-16 16:01:23 -04:00
committed by Andreas Kling
parent b7cac829ae
commit 7304556ff2
2 changed files with 4 additions and 0 deletions

View File

@@ -618,6 +618,9 @@ void Window::handle_fonts_change_event(FontsChangeEvent& event)
if (is_auto_shrinking())
schedule_relayout();
if (on_font_change)
on_font_change();
}
void Window::handle_screen_rects_change_event(ScreenRectsChangeEvent& event)

View File

@@ -99,6 +99,7 @@ public:
Close,
};
Function<void()> on_font_change;
Function<void()> on_close;
Function<CloseRequestDecision()> on_close_request;
Function<void(bool is_preempted)> on_input_preemption_change;