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
Notes: sideshowbarker 2024-07-19 07:40:59 +09:00

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();
}