- 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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user