mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
PDFViewer: Clear rendered page cache on application resize
When resizing the application, the pages are expected to grow or shrink proportionally. This means that after a resize, we need to rerender every page.
This commit is contained in:
committed by
Andreas Kling
parent
8da99c3014
commit
b2f79a74d4
Notes:
sideshowbarker
2024-07-17 14:27:43 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/b2f79a74d4 Pull-request: https://github.com/SerenityOS/serenity/pull/13394 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/nico
@@ -18,6 +18,11 @@ class PDFViewer : public GUI::AbstractScrollableWidget {
|
||||
C_OBJECT(PDFViewer)
|
||||
|
||||
public:
|
||||
enum class PageViewMode {
|
||||
Single,
|
||||
Multiple,
|
||||
};
|
||||
|
||||
virtual ~PDFViewer() override = default;
|
||||
|
||||
ALWAYS_INLINE u32 current_page() const { return m_current_page_index; }
|
||||
@@ -37,6 +42,7 @@ protected:
|
||||
PDFViewer();
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void resize_event(GUI::ResizeEvent&) override;
|
||||
virtual void mousewheel_event(GUI::MouseEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
virtual void mouseup_event(GUI::MouseEvent&) override;
|
||||
|
||||
Reference in New Issue
Block a user