1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

LibCore+LibGUI: Switch to using AK::is and AK::downcast

This commit is contained in:
Andreas Kling 2020-07-26 17:16:35 +02:00
parent 71556e39a4
commit e0b8b4ac67
14 changed files with 341 additions and 98 deletions

View file

@ -102,9 +102,9 @@ Gfx::IntRect TabWidget::child_rect_for_size(const Gfx::IntSize& size) const
void TabWidget::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);