1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

TextEditor: Show "Untitled" when there's no current document path

This commit is contained in:
Andreas Kling 2020-12-30 03:44:38 +01:00
parent 7c0e43eb3d
commit 2dc09d1cd7
3 changed files with 8 additions and 3 deletions

View file

@ -56,7 +56,6 @@ int main(int argc, char** argv)
auto app_icon = GUI::Icon::default_icon("app-text-editor");
auto window = GUI::Window::construct();
window->set_title("Text Editor");
window->resize(640, 400);
auto& text_widget = window->set_main_widget<TextEditorWidget>();
@ -84,6 +83,8 @@ int main(int argc, char** argv)
if (file_to_edit)
text_widget.open_sesame(file_to_edit);
else
text_widget.update_title();
window->show();
window->set_icon(app_icon.bitmap_for_size(16));