UI: Maintain aspect better on screenshots.
In case they are on a thin screen or something.
This commit is contained in:
parent
3bba9df133
commit
d1c9da6a9a
2 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ protected:
|
||||||
UI::LinearLayout *content = new UI::LinearLayout(UI::ORIENT_VERTICAL);
|
UI::LinearLayout *content = new UI::LinearLayout(UI::ORIENT_VERTICAL);
|
||||||
parent->Add(content);
|
parent->Add(content);
|
||||||
UI::Margins contentMargins(10, 0);
|
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:
|
private:
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
std::string image_path = ReplaceAll(savePath_, ".ppst", ".jpg");
|
std::string image_path = ReplaceAll(savePath_, ".ppst", ".jpg");
|
||||||
if (File::Exists(image_path)) {
|
if (File::Exists(image_path)) {
|
||||||
PrioritizedWorkQueue *wq = g_gameInfoCache->WorkQueue();
|
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 {
|
} else {
|
||||||
toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))))->SetTextColor(textStyle.fgColor);
|
toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))))->SetTextColor(textStyle.fgColor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue