mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:27:43 +00:00
LibGUI: Add Window::on_font_change() hook
This commit is contained in:
parent
b7cac829ae
commit
7304556ff2
2 changed files with 4 additions and 0 deletions
|
@ -618,6 +618,9 @@ void Window::handle_fonts_change_event(FontsChangeEvent& event)
|
||||||
|
|
||||||
if (is_auto_shrinking())
|
if (is_auto_shrinking())
|
||||||
schedule_relayout();
|
schedule_relayout();
|
||||||
|
|
||||||
|
if (on_font_change)
|
||||||
|
on_font_change();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::handle_screen_rects_change_event(ScreenRectsChangeEvent& event)
|
void Window::handle_screen_rects_change_event(ScreenRectsChangeEvent& event)
|
||||||
|
|
|
@ -99,6 +99,7 @@ public:
|
||||||
Close,
|
Close,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Function<void()> on_font_change;
|
||||||
Function<void()> on_close;
|
Function<void()> on_close;
|
||||||
Function<CloseRequestDecision()> on_close_request;
|
Function<CloseRequestDecision()> on_close_request;
|
||||||
Function<void(bool is_preempted)> on_input_preemption_change;
|
Function<void(bool is_preempted)> on_input_preemption_change;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue