VideoPlayer: Show current open file in the title

This commit is contained in:
Slimey 2022-11-06 13:14:29 +00:00 committed by Gunnar Beutner
commit 8006bdf6b4
Notes: sideshowbarker 2024-07-17 10:54:57 +09:00
3 changed files with 21 additions and 1 deletions

View file

@ -25,11 +25,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
auto window = TRY(GUI::Window::try_create());
window->set_title("Video Player");
window->resize(640, 480);
window->set_resizable(true);
auto main_widget = TRY(window->try_set_main_widget<VideoPlayer::VideoPlayerWidget>(window));
main_widget->update_title();
if (!filename.is_empty())
main_widget->open_file(filename);