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

LibGUI: Use parrent window icon for MessageBox dialog icon

This commit is contained in:
Hüseyin ASLITÜRK 2020-04-12 10:44:22 +03:00 committed by Andreas Kling
parent 264726b2d6
commit c6944f8cc2

View file

@ -36,8 +36,10 @@ namespace GUI {
int MessageBox::show(const StringView& text, const StringView& title, Type type, InputType input_type, Window* parent_window)
{
auto box = MessageBox::construct(text, title, type, input_type);
if (parent_window)
if (parent_window) {
parent_window->add_child(box);
box->set_icon(parent_window->icon());
}
return box->exec();
}