From 49115bed931de1758aa9a55493d23af0ce331292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 26 Oct 2026 19:43:15 +0100 Subject: [PATCH] Settings: Make the navigation bar fit square buttons, use chevrons between path parts Co-Authored-By: Claude Opus 5.5 (1M context) --- UI/SettingsPagesDialogScreen.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/UI/SettingsPagesDialogScreen.cpp b/UI/SettingsPagesDialogScreen.cpp index 94f1c3510f..4403d0d9d2 100644 --- a/UI/SettingsPagesDialogScreen.cpp +++ b/UI/SettingsPagesDialogScreen.cpp @@ -151,8 +151,10 @@ void SettingsPagesDialogScreen::CreateSettingsTabContents(int settingsTab, UI::L void SettingsPagesDialogScreen::CreateNavBar(UI::ViewGroup *parent, int settingsTab, const std::vector &titles, const std::string &helpTag) { using namespace UI; const SettingsTab &tab = settingsTabs_[settingsTab]; - LinearLayout *bar = parent->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, ITEM_HEIGHT, Margins(0, 0, 8, 0)))); - bar->SetPadding(Margins(12, 8, 12, 8)); + // Tall enough for the ITEM_HEIGHT buttons inside the padding, so they're square. + const Margins barPadding(12, 8, 12, 8); + LinearLayout *bar = parent->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, ITEM_HEIGHT + barPadding.vert(), Margins(0, 0, 8, 0)))); + bar->SetPadding(barPadding); bar->SetSpacing(0.0f); // When stacked in portrait, there's no other back button, so it's always there, and leaves the screen from the root page. @@ -169,7 +171,8 @@ void SettingsPagesDialogScreen::CreateNavBar(UI::ViewGroup *parent, int settings int firstShownTitle = stacked_ ? (int)titles.size() - 1 : 0; for (int i = firstShownTitle; i < (int)titles.size(); i++) { if (i > firstShownTitle) { - bar->Add(new TextView(">", new LinearLayoutParams(0.0f, Gravity::G_VCENTER, Margins(4, 0, 4, 0)))); + ImageView *separator = bar->Add(new ImageView(ImageID("I_CHEVRON_RIGHT"), "", new LinearLayoutParams(0.0f, Gravity::G_VCENTER, Margins(4, 0, 4, 0)))); + separator->SetScale(0.66f); } if (i == (int)titles.size() - 1) { SimpleTextView *title = bar->Add(new SimpleTextView(titles[i], new LinearLayoutParams(0.0f, Gravity::G_VCENTER)));