mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibCore+LibGUI: Switch to using AK::is and AK::downcast
This commit is contained in:
parent
71556e39a4
commit
e0b8b4ac67
Notes:
sideshowbarker
2024-07-19 04:36:09 +09:00
Author: https://github.com/awesomekling
Commit: e0b8b4ac67
14 changed files with 341 additions and 98 deletions
|
@ -63,9 +63,9 @@ void StackWidget::resize_event(ResizeEvent& event)
|
|||
|
||||
void StackWidget::child_event(Core::ChildEvent& event)
|
||||
{
|
||||
if (!event.child() || !Core::is<Widget>(*event.child()))
|
||||
if (!event.child() || !is<Widget>(*event.child()))
|
||||
return Widget::child_event(event);
|
||||
auto& child = Core::to<Widget>(*event.child());
|
||||
auto& child = downcast<Widget>(*event.child());
|
||||
if (event.type() == Event::ChildAdded) {
|
||||
if (!m_active_widget)
|
||||
set_active_widget(&child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue