- Add support for per folder image display options. The file called options.json contains json keys to control image options when displaying files in this folder. Currently a singled option, fitAspectAxisToWindow, is supported

- Remove duplicated image rotation reading code, have the image selector logic just pass this up via the per image options
This commit is contained in:
Alfred Reynolds
2021-08-01 13:05:43 +12:00
parent c29e228ae0
commit 5eaf7ee539
9 changed files with 149 additions and 103 deletions

View File

@@ -21,7 +21,8 @@ ImageSwitcher::ImageSwitcher(MainWindow& w, unsigned int timeout, std::unique_pt
void ImageSwitcher::updateImage()
{
std::string filename(selector->getNextImage());
ImageOptions_t options;
std::string filename(selector->getNextImage(options));
if (filename == "")
{
window.warn("No image found.");
@@ -29,7 +30,7 @@ void ImageSwitcher::updateImage()
}
else
{
window.setImage(filename);
window.setImage(filename, options);
timerNoContent.stop(); // we have loaded content so stop the fast polling
}
}