- Add new aspect mode EImageAspect_Monitor , match the aspect of the monitor

- Added code to make sure the QMainWindow matches the screen size, dynamic rotation of the monitor caused incorrect screen sizes
This commit is contained in:
Alfred Reynolds
2021-08-03 17:56:29 +12:00
parent 096a68636c
commit e8e4a2a1ce
5 changed files with 64 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
bool sorted = false;
bool debugMode = false;
ImageDisplayOptions_t baseDisplayOptions;
std::string valid_aspects = "alp"; // all, landscape, portait
std::string valid_aspects = "alpm"; // all, landscape, portait
std::string overlay = "";
std::string imageList = ""; // comma delimited list of images to show
int debugInt = 0;
@@ -71,6 +71,9 @@ int main(int argc, char *argv[])
case 'p':
baseDisplayOptions.onlyAspect = EImageAspect_Portrait;
break;
case 'm':
baseDisplayOptions.onlyAspect = EImageAspect_Monitor;
break;
default:
case 'a':
baseDisplayOptions.onlyAspect = EImageAspect_Any;
@@ -168,6 +171,7 @@ int main(int argc, char *argv[])
w.show();
ImageSwitcher switcher(w, rotationSeconds * 1000, selector);
w.setImageSwitcher(&switcher);
switcher.start();
return a.exec();
}