diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-03-14 18:41:31 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-03-14 18:41:31 +0100 |
commit | ce00471fd84745dcbbcb9f2d9ef434acb3d0fd2b (patch) | |
tree | d79a9c3d04d8ae182ccf6697da9f4d9f9e18f54d /include | |
parent | 0b1f7936b0d52ad39016c9a7ad5320474034d500 (diff) |
Image scroll view: add first/last image to allow scrolling to previous/next chapter, load next chapters page when reaching bottom
Diffstat (limited to 'include')
-rw-r--r-- | include/ImageViewer.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ImageViewer.hpp b/include/ImageViewer.hpp index cb63229..b587b82 100644 --- a/include/ImageViewer.hpp +++ b/include/ImageViewer.hpp @@ -55,6 +55,7 @@ namespace QuickMedia { int get_focused_page() const; int get_num_pages() const { return num_pages; } private: + void scroll_to_page(int page); void load_image_async(const Path &path, std::shared_ptr<ImageData> image_data); bool render_page(mgl::Window &window, int page, double offset_y); mgl::vec2d get_page_size(int page); @@ -100,5 +101,8 @@ namespace QuickMedia { bool loading_image = false; bool *fit_image_to_window; + + mgl::vec2d prev_size_first_page; + mgl::vec2d prev_size_last_page; }; }
\ No newline at end of file |