mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
VideoPlayer: Show current open file in the title
This commit is contained in:
parent
13ac078202
commit
8006bdf6b4
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/sl1m3yy 🔰
Commit: 8006bdf6b4
Pull-request: https://github.com/SerenityOS/serenity/pull/15957
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 21 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue