From e8a83269bbc185cdb2f9c663c9c3ad772fd977be Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 5 Oct 2021 23:50:21 -0700 Subject: [PATCH] UI: Add scroll to savedata viewer for long descs. --- UI/SavedataScreen.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 1fbab9ab6a..593e3b8bd6 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -87,10 +87,13 @@ public: const Style &textStyle = dc.theme->popupStyle; std::shared_ptr ginfo = g_gameInfoCache->GetInfo(screenManager()->getDrawContext(), savePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE); - LinearLayout *content = new LinearLayout(ORIENT_VERTICAL); - parent->Add(content); if (!ginfo) return; + + ScrollView *contentScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f)); + LinearLayout *content = new LinearLayout(ORIENT_VERTICAL); + parent->Add(contentScroll); + contentScroll->Add(content); LinearLayout *toprow = new LinearLayout(ORIENT_HORIZONTAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT)); content->Add(toprow);