add on_after_layout

This commit is contained in:
hippoz 2022-07-27 03:26:51 +03:00
parent cc1d49c435
commit 4d7cb99fb1
No known key found for this signature in database
GPG key ID: 7C52899193467641
2 changed files with 3 additions and 0 deletions

View file

@ -202,6 +202,8 @@ void Widget::handle_relayout_subtree(RelayoutSubtreeEvent &event) {
for (auto child : m_children) { for (auto child : m_children) {
child->dispatch_event(event); child->dispatch_event(event);
} }
on_after_layout();
} }
void Widget::handle_mouse_move_event(MouseMoveEvent &event) { void Widget::handle_mouse_move_event(MouseMoveEvent &event) {

View file

@ -119,6 +119,7 @@ protected:
virtual void on_activation_update(ActivationUpdateEvent &event) {} virtual void on_activation_update(ActivationUpdateEvent &event) {}
virtual void on_paint() {} virtual void on_paint() {}
virtual void on_layout() {} virtual void on_layout() {}
virtual void on_after_layout() {}
void set_did_init(bool did_init) { m_did_init = did_init; } void set_did_init(bool did_init) { m_did_init = did_init; }
Point compute_window_relative(); Point compute_window_relative();