1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

VideoPlayer: Add button and menu item to toggle fullscreen

Add a button to the bottom toolbar and a menu item to toggle fullscreen.
Also implement toggling fullscreen mode by double-clicking the video.
This commit is contained in:
timre13 2023-02-24 18:18:01 +01:00 committed by Linus Groh
parent 1379720742
commit d7f348ab50
5 changed files with 42 additions and 0 deletions

View file

@ -45,6 +45,12 @@ void VideoFrameWidget::mousedown_event(GUI::MouseEvent&)
on_click();
}
void VideoFrameWidget::doubleclick_event(GUI::MouseEvent&)
{
if (on_doubleclick)
on_doubleclick();
}
void VideoFrameWidget::paint_event(GUI::PaintEvent& event)
{
Frame::paint_event(event);