A lot more round corner fixes and layout fixes.

This commit is contained in:
Henrik Rydgård committed 2026-10-25 10:28:40 +01:00
1 parent daadd1a15c
commit 965b07c527
20 files changed
+96 -69

No files matched your search

+15 -9
View File
@@ -638,7 +638,11 @@ void TouchControlLayoutScreen::CreateViews() {
ScrollView *leftColumnScroll = root_->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(leftColumnWidth, FILL_PARENT)));
leftColumnScroll->SetAlignOpposite(true);
LinearLayout *leftColumn = leftColumnScroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(Margins(12.0f, 0.0f))));
ChoiceGroupList *leftColumn = leftColumnScroll->Add(new ChoiceGroupList());
// More compact spacing since this is not a full on settings view.
leftColumn->SetSpacing(12.0f);
mode_ = new ChoiceStrip(ORIENT_VERTICAL);
mode_->AddChoice(di->T("Move"), ImageID("I_MOVE"));
@@ -650,21 +654,23 @@ void TouchControlLayoutScreen::CreateViews() {
layoutView_->mode_ = mode;
}
});
CheckBox *snap = new CheckBox(&g_Config.bTouchSnapToGrid, di->T("Snap"));
PopupSliderChoice *gridSize = new PopupSliderChoice(&g_Config.iTouchSnapGridSize, 2, 256, 64, di->T("Grid"), screenManager(), "");
gridSize->SetEnabledPtr(&g_Config.bTouchSnapToGrid);
mode_->ApplyRoundCorners();
leftColumn->Add(mode_);
leftColumn->Add(new Choice(co->T("Customize")))->OnClick.Add([this](UI::EventParams &e) {
screenManager()->push(new TouchControlVisibilityScreen(gamePath_));
});
leftColumn->Add(snap);
leftColumn->Add(gridSize);
ChoiceGroup *gridControls = leftColumn->Add(new ChoiceGroup());
CheckBox *snap = gridControls->Add(new CheckBox(&g_Config.bTouchSnapToGrid, di->T("Snap")));
PopupSliderChoice *gridSize = gridControls->Add(new PopupSliderChoice(&g_Config.iTouchSnapGridSize, 2, 256, 64, di->T("Grid"), screenManager(), ""));
gridSize->SetEnabledPtr(&g_Config.bTouchSnapToGrid);
leftColumn->Add(new Choice(di->T("Reset")))->OnClick.Handle(this, &TouchControlLayoutScreen::OnReset);
leftColumn->Add(new Spacer(12.0f));
leftColumn->Add(new Choice(di->T("Back"), ImageID("I_NAVIGATE_BACK")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
leftColumn->Add(new Spacer(0.0f));
leftColumn->ApplyRoundCorners();
leftColumnScroll->SetShadows(false);
LinearLayout* rightColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f, Margins(0.0f, 12.0f, 12.0f, 12.0f))));