diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index a33f5163c1..f7cac548aa 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -570,11 +570,11 @@ void AnalogSetupScreen::CreateViews() { root_ = new LinearLayout(ORIENT_HORIZONTAL); - LinearLayout *leftColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, FILL_PARENT))); + LinearLayout *leftColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, FILL_PARENT, Margins(10, 0, 0, 10)))); LinearLayout *rightColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f))); auto co = GetI18NCategory(I18NCat::CONTROLS); - ScrollView *scroll = leftColumn->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0))); + ScrollView *scroll = leftColumn->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f))); LinearLayout *scrollContents = scroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, WRAP_CONTENT))); @@ -596,7 +596,7 @@ void AnalogSetupScreen::CreateViews() { rightColumn->Add(theTwo); - leftColumn->Add(new Button(di->T("Back"), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->OnClick.Handle(this, &UIScreen::OnBack); + AddStandardBack(leftColumn); } UI::EventReturn AnalogSetupScreen::OnResetToDefaults(UI::EventParams &e) { diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index c6b296aee5..b537073a34 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -1174,7 +1174,7 @@ void FrameDumpTestScreen::CreateViews() { TabHolder *tabHolder; tabHolder = new TabHolder(ORIENT_VERTICAL, 200, nullptr, new AnchorLayoutParams(10, 0, 10, 0, false)); root_->Add(tabHolder); - AddStandardBack(root_); + tabHolder->AddBack(this); tabHolder->SetTag("DumpTypes"); root_->SetDefaultFocusView(tabHolder); @@ -1326,7 +1326,7 @@ void TouchTestScreen::CreateViews() { root_->Add(new Choice(gr->T("Recreate Activity")))->OnClick.Handle(this, &TouchTestScreen::OnRecreateActivity); #endif root_->Add(new CheckBox(&g_Config.bImmersiveMode, gr->T("FullScreen", "Full Screen")))->OnClick.Handle(this, &TouchTestScreen::OnImmersiveModeChange); - root_->Add(new Button(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); + root_->Add(new Button(di->T("Back"), new LinearLayoutParams(FILL_PARENT, 64, Margins(10, 0))))->OnClick.Handle(this, &UIScreen::OnBack); } void TouchTestScreen::UpdateLogView() { diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index b1e0e51a7b..2239d0dd5c 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -326,13 +326,14 @@ void DeveloperToolsScreen::CreateMIPSTracerTab(UI::LinearLayout *list) { return UI::EVENT_CONTINUE; }); - Button *FlushTrace = list->Add(new Button(dev->T("Flush the trace"))); + list->Add(new ItemHeader(dev->T("MIPSTracer actions"))); + Choice *FlushTrace = list->Add(new Choice(dev->T("Flush the trace"))); FlushTrace->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerFlushTrace); - Button *InvalidateJitCache = list->Add(new Button(dev->T("Clear the JIT cache"))); + Choice *InvalidateJitCache = list->Add(new Choice(dev->T("Clear the JIT cache"))); InvalidateJitCache->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerClearJitCache); - Button *ClearMIPSTracer = list->Add(new Button(dev->T("Clear the MIPSTracer"))); + Choice *ClearMIPSTracer = list->Add(new Choice(dev->T("Clear the MIPSTracer"))); ClearMIPSTracer->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerClearTracer); } diff --git a/UI/GPUDriverTestScreen.cpp b/UI/GPUDriverTestScreen.cpp index e5e7f5b8a9..7ca6e93cab 100644 --- a/UI/GPUDriverTestScreen.cpp +++ b/UI/GPUDriverTestScreen.cpp @@ -306,7 +306,7 @@ void GPUDriverTestScreen::CreateViews() { tabHolder_->AddTab("Discard", new LinearLayout(ORIENT_VERTICAL)); tabHolder_->AddTab("Shader", new LinearLayout(ORIENT_VERTICAL)); - Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(100, WRAP_CONTENT, 10, NONE, NONE, 10)); + Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(190, WRAP_CONTENT, 10, NONE, NONE, 10)); back->OnClick.Handle(this, &UIScreen::OnBack); anchor->Add(back); } diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 386396d1cd..ca9d385718 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -144,7 +144,7 @@ void GameScreen::CreateViews() { } } - leftColumn->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack); + AddStandardBack(leftColumn); ViewGroup *badgeHolder = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(10, 10, 110, NONE)); LinearLayout *mainGameInfo = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)); diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index fdcb98de70..9310b2518c 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -827,7 +827,7 @@ void GameBrowser::Refresh() { Add(topBar); if (*gridStyle_) { - gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); + gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(10, 0, 0, 0))); } else { UI::LinearLayout *gl = new UI::LinearLayoutList(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); gl->SetSpacing(4.0f); @@ -835,7 +835,7 @@ void GameBrowser::Refresh() { } } else { if (*gridStyle_) { - gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); + gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(10, 0, 0, 0))); } else { UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); gl->SetSpacing(4.0f); @@ -960,7 +960,7 @@ void GameBrowser::Refresh() { if (!lastText_.empty()) { Add(new Spacer()); - Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::LastClick); + Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT, Margins(10, 0, 0, 10))))->OnClick.Handle(this, &GameBrowser::LastClick); } } diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 1ade266803..e42e2f68cb 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -608,7 +608,7 @@ void UIScreenWithBackground::sendMessage(UIMessage message, const char *value) { void UIDialogScreenWithBackground::AddStandardBack(UI::ViewGroup *parent) { using namespace UI; auto di = GetI18NCategory(I18NCat::DIALOG); - parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); + parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(190, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &UIScreen::OnBack); } void UIDialogScreenWithBackground::sendMessage(UIMessage message, const char *value) { diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index ceb0f461cb..6c2f610b80 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -380,7 +380,7 @@ void GamePauseScreen::CreateSavestateControls(UI::LinearLayout *leftColumnItems, } leftColumnItems->Add(new Spacer(0.0)); - LinearLayout *buttonRow = leftColumnItems->Add(new LinearLayout(ORIENT_HORIZONTAL)); + LinearLayout *buttonRow = leftColumnItems->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(Margins(10, 0, 0, 0)))); if (g_Config.bEnableStateUndo && !Achievements::HardcoreModeActive() && NetworkAllowSaveState()) { UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last load"))); loadUndoButton->SetEnabled(SaveState::HasUndoLoad(gamePath_)); diff --git a/UI/TabbedDialogScreen.cpp b/UI/TabbedDialogScreen.cpp index c4b3dd81dd..934a0b24a2 100644 --- a/UI/TabbedDialogScreen.cpp +++ b/UI/TabbedDialogScreen.cpp @@ -42,7 +42,7 @@ void TabbedUIDialogScreenWithGameBackground::CreateViews() { tabHolder_ = new TabHolder(ORIENT_HORIZONTAL, 200, filterNotice_, new LinearLayoutParams(1.0f)); verticalLayout->Add(tabHolder_); CreateExtraButtons(verticalLayout, 0); - verticalLayout->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 0.0f, Margins(0))))->OnClick.Handle(this, &UIScreen::OnBack); + verticalLayout->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 0.0f, Margins(10, 0))))->OnClick.Handle(this, &UIScreen::OnBack); root_->Add(verticalLayout); } else { tabHolder_ = new TabHolder(ORIENT_VERTICAL, 200, filterNotice_, new AnchorLayoutParams(10, 0, 10, 0, false));