mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
PDFViewer: Add zoom in/out/reset menu actions
Make PDFViewer::zoom_in() & ::zoom_out() public and add menu and toolbar actions. Also add an action for zoom reset.
This commit is contained in:
parent
45085122ee
commit
3af71c406d
4 changed files with 50 additions and 8 deletions
|
@ -49,6 +49,10 @@ public:
|
|||
|
||||
Function<void(u32 new_page)> on_page_change;
|
||||
|
||||
void zoom_in();
|
||||
void zoom_out();
|
||||
void reset_zoom();
|
||||
|
||||
protected:
|
||||
PDFViewer();
|
||||
|
||||
|
@ -60,9 +64,6 @@ private:
|
|||
RefPtr<Gfx::Bitmap> get_rendered_page(u32 index);
|
||||
RefPtr<Gfx::Bitmap> render_page(const PDF::Page&);
|
||||
|
||||
void zoom_in();
|
||||
void zoom_out();
|
||||
|
||||
RefPtr<PDF::Document> m_document;
|
||||
u32 m_current_page_index { 0 };
|
||||
Vector<HashMap<u32, RefPtr<Gfx::Bitmap>>> m_rendered_page_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue