mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibGUI: Use parrent window icon for MessageBox dialog icon
This commit is contained in:
parent
264726b2d6
commit
c6944f8cc2
1 changed files with 3 additions and 1 deletions
|
@ -36,8 +36,10 @@ namespace GUI {
|
||||||
int MessageBox::show(const StringView& text, const StringView& title, Type type, InputType input_type, Window* parent_window)
|
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);
|
auto box = MessageBox::construct(text, title, type, input_type);
|
||||||
if (parent_window)
|
if (parent_window) {
|
||||||
parent_window->add_child(box);
|
parent_window->add_child(box);
|
||||||
|
box->set_icon(parent_window->icon());
|
||||||
|
}
|
||||||
return box->exec();
|
return box->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue