1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

Demos/CatDog: Let the speech bubble know about the CatDog widget

This will allow us to have better interaction between CatDog's state and
what it's saying.
This commit is contained in:
kleines Filmröllchen 2022-02-26 19:34:10 +01:00 committed by Andreas Kling
parent 835e99c86c
commit 83d9a89275
2 changed files with 9 additions and 2 deletions

View file

@ -58,7 +58,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
advice_window->set_has_alpha_channel(true);
advice_window->set_alpha_hit_threshold(1.0f);
auto advice_widget = TRY(advice_window->try_set_main_widget<SpeechBubble>());
auto advice_widget = TRY(advice_window->try_set_main_widget<SpeechBubble>(catdog_widget));
(void)TRY(advice_widget->try_set_layout<GUI::VerticalBoxLayout>());
advice_widget->layout()->set_spacing(0);