aboutsummaryrefslogtreecommitdiff
path: root/include/ImageViewer.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-17 03:32:56 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-17 03:32:56 +0200
commit23435ac30b25cd1a0a8d52c4a792d90f38300344 (patch)
treeb032a66dfcd30b005e2ff9a506b93f30a013e512 /include/ImageViewer.hpp
parente183c47ec2db4e3bdd82a3fbbe81d2d61c64107a (diff)
Fit image to window in continuous scrolling mode, use n 3 for waifu2x
Diffstat (limited to 'include/ImageViewer.hpp')
-rw-r--r--include/ImageViewer.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ImageViewer.hpp b/include/ImageViewer.hpp
index c29ea13..74d93c1 100644
--- a/include/ImageViewer.hpp
+++ b/include/ImageViewer.hpp
@@ -29,6 +29,7 @@ namespace QuickMedia {
ImageStatus image_status;
std::unique_ptr<sf::Image> image;
bool visible_on_screen;
+ float prev_height = 0.0f;
};
struct PageSize {
@@ -44,7 +45,7 @@ namespace QuickMedia {
class ImageViewer {
public:
- ImageViewer(sf::RenderWindow *window, int num_pages, const std::string &content_title, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir);
+ ImageViewer(sf::RenderWindow *window, int num_pages, const std::string &content_title, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir, bool *fit_image_to_window);
~ImageViewer();
ImageViewerAction draw();
// Returns page as 1 indexed
@@ -95,5 +96,7 @@ namespace QuickMedia {
std::thread image_loader_thread;
bool loading_image = false;
+
+ bool *fit_image_to_window;
};
} \ No newline at end of file