mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 13:05:12 +00:00
LibGUI: Use parrent window icon for MessageBox dialog icon
This commit is contained in:
parent
264726b2d6
commit
c6944f8cc2
Notes:
sideshowbarker
2024-07-19 07:40:59 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/c6944f8cc21 Pull-request: https://github.com/SerenityOS/serenity/pull/1756 Reviewed-by: https://github.com/awesomekling
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)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue