From 65bf285e41e232b471ee46b56418a729590e712a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 1 Sep 2018 14:56:56 -0700 Subject: [PATCH] UI: Fix state screenshot size on pause screen. Was stretched wide here, but fine in save data manager. --- UI/PauseScreen.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index f066103ba7..c046a11623 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -138,12 +138,15 @@ public: } protected: - virtual bool FillVertical() const override { return false; } + bool FillVertical() const override { return false; } + UI::Size PopupWidth() const override { return 500; } bool ShowButtons() const override { return true; } - virtual void CreatePopupContents(UI::ViewGroup *parent) override { - // TODO: Find an appropriate size for the image view - parent->Add(new AsyncImageFileView(filename_, UI::IS_DEFAULT, NULL, new UI::LayoutParams(480, 272)))->SetCanBeFocused(false); + void CreatePopupContents(UI::ViewGroup *parent) override { + 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); } private: