Permalink
Browse files

UI: Maintain aspect better on screenshots.

In case they are on a thin screen or something.
  • Loading branch information...
unknownbrackets committed Sep 22, 2018
1 parent 3bba9df commit d1c9da6a9a1de7ba809ce85e07bc20569e878310
Showing with 2 additions and 2 deletions.
  1. +1 −1 UI/PauseScreen.cpp
  2. +1 −1 UI/SavedataScreen.cpp
View
@@ -175,7 +175,7 @@ class ScreenshotViewScreen : public PopupScreen {
UI::LinearLayout *content = new UI::LinearLayout(UI::ORIENT_VERTICAL);
parent->Add(content);
UI::Margins contentMargins(10, 0);
content->Add(new AsyncImageFileView(filename_, UI::IS_DEFAULT, nullptr, new UI::LinearLayoutParams(480, 272, contentMargins)))->SetCanBeFocused(false);
content->Add(new AsyncImageFileView(filename_, UI::IS_KEEP_ASPECT, nullptr, new UI::LinearLayoutParams(480, 272, contentMargins)))->SetCanBeFocused(false);
}
private:
View
@@ -101,7 +101,7 @@ class SavedataPopupScreen : public PopupScreen {
std::string image_path = ReplaceAll(savePath_, ".ppst", ".jpg");
if (File::Exists(image_path)) {
PrioritizedWorkQueue *wq = g_gameInfoCache->WorkQueue();
toprow->Add(new AsyncImageFileView(image_path, IS_DEFAULT, wq, new LinearLayoutParams(480, 272, Margins(10, 0))));
toprow->Add(new AsyncImageFileView(image_path, IS_KEEP_ASPECT, wq, new LinearLayoutParams(480, 272, Margins(10, 0))));
} else {
toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))))->SetTextColor(textStyle.fgColor);
}

0 comments on commit d1c9da6

Please sign in to comment.