mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 03:57:17 +01:00
UI: Give LinearLayout a working padding setting
LinearLayout had a public padding member that only DisplayLayoutScreen set. Make it private with a setter, and fix the measuring: the vertical retry used the horizontal padding, the AT_MOST retries and the weighted children ignored it, and growing to fit weighted children counted it twice. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ad132d8f1b
commit
e30c8f7141
3 files changed
+30
-26
No files matched your search
@@ -245,7 +245,7 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
if (!portrait) {
|
||||
ScrollView *leftScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(420.0f, FILL_PARENT, 0.f, 0.f, NONE, 0.f));
|
||||
leftColumn = new LinearLayout(ORIENT_VERTICAL);
|
||||
leftColumn->padding.SetAll(8.0f);
|
||||
leftColumn->SetPadding(Margins(8));
|
||||
leftScrollView->Add(leftColumn);
|
||||
leftScrollView->SetClickableBackground(true);
|
||||
root_->Add(leftScrollView);
|
||||
@@ -253,7 +253,7 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
|
||||
ScrollView *rightScrollView = new ScrollView(ORIENT_VERTICAL, new AnchorLayoutParams(300.0f, FILL_PARENT, NONE, 0.f, 0.f, 0.f));
|
||||
LinearLayout *rightColumn = new LinearLayout(ORIENT_VERTICAL);
|
||||
rightColumn->padding.SetAll(8.0f);
|
||||
rightColumn->SetPadding(Margins(8));
|
||||
rightColumn->SetSpacing(0.0f);
|
||||
rightScrollView->Add(rightColumn);
|
||||
rightScrollView->SetClickableBackground(true);
|
||||
|
||||
Reference in new issue
Block a user