Permalink
Browse files

UI: Properly center storage perm prompt.

IMHO it was always a hack to add it to the tabgroup directly.
  • Loading branch information...
unknownbrackets committed Dec 13, 2017
1 parent c78031b commit 21e02e16355cbc26a1c054562a7ec7f38ab45fbb
Showing with 9 additions and 9 deletions.
  1. +9 −9 UI/MainScreen.cpp
@@ -734,8 +734,8 @@ void MainScreen::CreateViews() {
Margins actionMenuMargins(0, 10, 10, 0);
TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f));
tabHolder_ = leftColumn;
tabHolder_ = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f));
ViewGroup *leftColumn = tabHolder_;
tabHolder_->SetTag("MainScreenGames");
gameBrowsers_.clear();
@@ -810,6 +810,13 @@ void MainScreen::CreateViews() {
showHomebrewTab = false;
}
} else {
if (!showRecent) {
leftColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f));
// Just so it's destroyed on recreate.
leftColumn->Add(tabHolder_);
tabHolder_->SetVisibility(V_GONE);
}
LinearLayout *buttonHolder = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
buttonHolder->Add(new Spacer(new LinearLayoutParams(1.0f)));
buttonHolder->Add(new Button(mm->T("Give PPSSPP permission to access storage"), new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)))->OnClick.Handle(this, &MainScreen::OnAllowStorage);
@@ -822,13 +829,6 @@ void MainScreen::CreateViews() {
leftColumn->Add(new Spacer(new LinearLayoutParams(0.1f)));
}
/* if (info) {
texvGameIcon_ = leftColumn->Add(new TextureView(0, IS_DEFAULT, new AnchorLayoutParams(144 * 2, 80 * 2, 10, 10, NONE, NONE)));
tvTitle_ = leftColumn->Add(new TextView(0, info->title, ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 200, NONE, NONE)));
tvGameSize_ = leftColumn->Add(new TextView(0, "...", ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 250, NONE, NONE)));
tvSaveDataSize_ = leftColumn->Add(new TextView(0, "...", ALIGN_LEFT, 1.0f, new AnchorLayoutParams(10, 290, NONE, NONE)));
} */
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL);
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
rightColumnItems->SetSpacing(0.0f);

0 comments on commit 21e02e1

Please sign in to comment.