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

PDFViewer: Enable panning with middle mouse button

Enable the use of the middle mouse button for panning in PDFViewer.
This commit is contained in:
Marcus Nilsson 2022-01-02 23:30:13 +01:00 committed by Andreas Kling
parent 3af71c406d
commit 56bec4968c
2 changed files with 28 additions and 0 deletions

View file

@ -58,6 +58,9 @@ protected:
virtual void paint_event(GUI::PaintEvent&) override;
virtual void mousewheel_event(GUI::MouseEvent&) override;
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void timer_event(Core::TimerEvent&) override;
private:
@ -69,4 +72,6 @@ private:
Vector<HashMap<u32, RefPtr<Gfx::Bitmap>>> m_rendered_page_list;
u8 m_zoom_level { initial_zoom_level };
Gfx::IntPoint m_pan_starting_position;
};