1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +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

@ -35,11 +35,13 @@ public:
bool auto_resize() const { return m_auto_resize; }
Function<void()> on_click;
Function<void()> on_doubleclick;
protected:
explicit VideoFrameWidget();
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void doubleclick_event(GUI::MouseEvent&) override;
virtual void paint_event(GUI::PaintEvent&) override;
private: