Fix spacing issues

This commit is contained in:
Henrik Rydgård committed 2026-11-06 22:58:31 +01:00
1 parent 52c6a8237c
commit b83d2ffe8f
2 files changed
+3 -8

No files matched your search

+1 -1
View File
@@ -250,7 +250,7 @@ void MessagePopupScreen::CreatePopupContents(UI::ViewGroup *parent) {
std::vector<std::string_view> messageLines;
SplitString(message_, '\n', messageLines);
for (auto lineOfText : messageLines) {
parent->Add(new UI::TextView(lineOfText, ALIGN_LEFT | ALIGN_VCENTER | FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(8))));
parent->Add(new UI::TextView(lineOfText, ALIGN_LEFT | ALIGN_VCENTER | FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(0, 12))));
}
}
+2 -7
View File
@@ -716,7 +716,6 @@ void GamePauseScreen::CreateViews() {
} else {
middleColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(ITEM_HEIGHT, FILL_PARENT, Margins(0, 10, 0, 15)));
root_->Add(middleColumn);
middleColumn->SetSpacing(0.0f);
ViewGroup *buttonColumnScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(320, FILL_PARENT, actionMenuMargins));
buttonColumn = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
@@ -725,6 +724,7 @@ void GamePauseScreen::CreateViews() {
}
LinearLayout *rightColumnItems = new ChoiceGroupList();
rightColumnItems->SetPadding(Margins(0, 0, 12, 12));
rightColumnItems->SetSpacing(12.0f);
buttonColumn->Add(rightColumnItems);
@@ -828,7 +828,7 @@ void GamePauseScreen::CreateViews() {
exit->SetEnabled(!bootPending_);
if (middleColumn) {
middleColumn->SetSpacing(portrait ? 12.0f : 0.0f);
middleColumn->SetSpacing(12.0f);
playButton_ = middleColumn->Add(new Choice(g_Config.bRunBehindPauseMenu ? ImageID("I_PAUSE_LINE") : ImageID("I_PLAY_LINE"), new LinearLayoutParams(64, 64)));
playButton_->OnClick.Add([this](UI::EventParams &e) {
g_Config.bRunBehindPauseMenu = !g_Config.bRunBehindPauseMenu;
@@ -839,10 +839,6 @@ void GamePauseScreen::CreateViews() {
bool mustRunBehind = MustRunBehind();
playButton_->SetEnabled(!mustRunBehind);
if (!portrait) {
middleColumn->Add(new Spacer(12.0f));
}
Choice *infoButton = middleColumn->Add(new Choice(ImageID("I_INFO"), new LinearLayoutParams(64, 64)));
infoButton->OnClick.Add([this](UI::EventParams &e) {
screenManager()->push(new GameScreen(gamePath_, true));
@@ -854,7 +850,6 @@ void GamePauseScreen::CreateViews() {
}
if (!portrait) {
middleColumn->Add(new Spacer(12.0f));
Choice *menuButton = middleColumn->Add(new Choice("", ImageID("I_THREE_DOTS"), new LinearLayoutParams(64, 64)));
menuButton->OnClick.Add([this, menuButton, portrait](UI::EventParams &e) {
ShowContextMenu(menuButton, portrait);