mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
PDFViewer: Let users change clipping paths visibility
Now that the Renderer accepts preferences, PDFViewer can offer ways for changing these preferences. The first step in this direction is to add a checkbox that allows toggling whether clipping paths are visible or not. A Config item has also been added to remember this setting.
This commit is contained in:
parent
e92ec26771
commit
bc7da24fe6
4 changed files with 26 additions and 4 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibGUI/AbstractScrollableWidget.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibPDF/Document.h>
|
||||
#include <LibPDF/Renderer.h>
|
||||
|
||||
static constexpr size_t initial_zoom_level = 8;
|
||||
|
||||
|
@ -60,6 +61,8 @@ public:
|
|||
|
||||
PageViewMode page_view_mode() const { return m_page_view_mode; }
|
||||
void set_page_view_mode(PageViewMode);
|
||||
bool show_clipping_paths() const { return m_rendering_preferences.show_clipping_paths; }
|
||||
void set_show_clipping_paths(bool);
|
||||
|
||||
protected:
|
||||
PDFViewer();
|
||||
|
@ -90,6 +93,7 @@ private:
|
|||
u8 m_zoom_level { initial_zoom_level };
|
||||
PageDimensionCache m_page_dimension_cache;
|
||||
PageViewMode m_page_view_mode;
|
||||
PDF::RenderingPreferences m_rendering_preferences;
|
||||
|
||||
Gfx::IntPoint m_pan_starting_position;
|
||||
int m_rotations { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue