mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
TextEditor: Set window title before showing the main window
Previously TextEditor updated its window title after the window was already visible. This causes the default title ("GUI::Window") to be shown for a short period of time which was especially noticeable when opening files.
This commit is contained in:
parent
8373a14835
commit
344ca73930
1 changed files with 3 additions and 1 deletions
|
@ -67,6 +67,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
}
|
}
|
||||||
|
|
||||||
text_widget->initialize_menubar(*window);
|
text_widget->initialize_menubar(*window);
|
||||||
|
text_widget->update_title();
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
window->set_icon(app_icon.bitmap_for_size(16));
|
window->set_icon(app_icon.bitmap_for_size(16));
|
||||||
|
@ -85,8 +86,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
return 1;
|
return 1;
|
||||||
text_widget->editor().set_cursor_and_focus_line(parsed_argument.line().value_or(1) - 1, parsed_argument.column().value_or(0));
|
text_widget->editor().set_cursor_and_focus_line(parsed_argument.line().value_or(1) - 1, parsed_argument.column().value_or(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
text_widget->update_title();
|
||||||
}
|
}
|
||||||
text_widget->update_title();
|
|
||||||
text_widget->update_statusbar();
|
text_widget->update_statusbar();
|
||||||
|
|
||||||
return app->exec();
|
return app->exec();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue