diff --git a/UI/CustomButtonMappingScreen.h b/UI/CustomButtonMappingScreen.h index f5af27f51f..9f6f2b5a00 100644 --- a/UI/CustomButtonMappingScreen.h +++ b/UI/CustomButtonMappingScreen.h @@ -38,6 +38,10 @@ protected: void dialogFinished(const Screen *dialog, DialogResult result) override; std::string_view GetTitle() const override; + ViewLayoutMode LayoutMode() const override { + return ViewLayoutMode::IgnoreBottomInset; + } + private: void saveArray(); diff --git a/UI/SimpleDialogScreen.cpp b/UI/SimpleDialogScreen.cpp index 9eb1122824..2088f8648e 100644 --- a/UI/SimpleDialogScreen.cpp +++ b/UI/SimpleDialogScreen.cpp @@ -32,7 +32,7 @@ void UISimpleBaseDialogScreen::CreateViews() { if (flags_ & SimpleDialogFlags::ContentsCanScroll) { ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f)); - LinearLayout *contents = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(Margins(0, 0, 8, 0))); + LinearLayout *contents = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(Margins(0, 0, portrait ? 0 : 8, 0))); contents->SetSpacing(0); CreateDialogViews(contents); scroll->Add(contents); @@ -45,7 +45,7 @@ void UISimpleBaseDialogScreen::CreateViews() { ViewLayoutMode UITwoPaneBaseDialogScreen::LayoutMode() const { const bool portrait = GetDeviceOrientation() == DeviceOrientation::Portrait; if (portrait) { - if (flags_ & TwoPaneFlags::SettingsCanScroll) { + if ((flags_ & TwoPaneFlags::SettingsCanScroll) || (flags_ & TwoPaneFlags::ContentsCanScroll)) { return ViewLayoutMode::IgnoreBottomInset; } else { return ViewLayoutMode::ApplyInsets; @@ -111,9 +111,9 @@ void UITwoPaneBaseDialogScreen::CreateViews() { if (!(flags_ & TwoPaneFlags::SettingsInContextMenu)) { LinearLayout *settingsPane; if (flags_ & TwoPaneFlags::SettingsCanScroll) { - settingsPane = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); + settingsPane = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(8))); settingsPane->SetSpacing(0.0f); - ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f, Margins(8))); + ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f)); settingsScroll->Add(settingsPane); root->Add(settingsScroll); } else { diff --git a/UI/TiltAnalogSettingsScreen.cpp b/UI/TiltAnalogSettingsScreen.cpp index 7f035afc9c..09a064593a 100644 --- a/UI/TiltAnalogSettingsScreen.cpp +++ b/UI/TiltAnalogSettingsScreen.cpp @@ -29,6 +29,7 @@ #include "UI/JoystickHistoryView.h" #include "UI/GamepadEmu.h" #include "UI/TiltAnalogSettingsScreen.h" +#include "UI/MiscViews.h" const char *g_tiltTypes[] = { "None (Disabled)", "Analog Stick", "D-PAD", "PSP Action Buttons", "L/R Trigger Buttons" }; const size_t g_numTiltTypes = ARRAY_SIZE(g_tiltTypes); @@ -113,15 +114,12 @@ void TiltAnalogSettingsScreen::CreateSettingsViews(UI::ViewGroup *settings) { }); typeChoice->SetEnabledPtr(&g_Config.bTiltInputEnabled); settings->Add(new ItemHeader(co->T("Calibration"))); - TextView *calibrationInfo = new TextView(co->T("To Calibrate", "Hold device at your preferred angle and press Calibrate.")); - calibrationInfo->SetSmall(true); - calibrationInfo->SetPadding(Margins(5)); - calibrationInfo->SetAlign(FLAG_WRAP_TEXT); - settings->Add(calibrationInfo); Choice *calibrate = new Choice(co->T("Calibrate")); calibrate->OnClick.Handle(this, &TiltAnalogSettingsScreen::OnCalibrate); calibrate->SetEnabledPtr(&g_Config.bTiltInputEnabled); settings->Add(calibrate); + SettingHint *calibrationInfo = new SettingHint(co->T("To Calibrate", "Hold device at your preferred angle and press Calibrate."), calibrate); + settings->Add(calibrationInfo); settings->Add(new ItemHeader(co->T("Sensitivity"))); if (g_Config.iTiltInputType == 1) {