From 4b3af8cb5481efb2b1e384fc29a1b333cc43ad7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 17 Feb 2026 22:36:35 +0100 Subject: [PATCH] Fix some minor UI issues with title bars --- UI/MiscViews.cpp | 7 ++++--- UI/TabbedDialogScreen.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UI/MiscViews.cpp b/UI/MiscViews.cpp index c67fba3e70..b1de99e236 100644 --- a/UI/MiscViews.cpp +++ b/UI/MiscViews.cpp @@ -49,7 +49,7 @@ TopBar::TopBar(const UIContext &ctx, TopBarFlags flags, std::string_view title, SetSpacing(10.0f); if (!layoutParams) { layoutParams_->width = UI::FILL_PARENT; - layoutParams_->height = 64.0f; + layoutParams_->height = ITEM_HEIGHT; } if (!(flags & TopBarFlags::NoBackButton)) { @@ -64,7 +64,7 @@ TopBar::TopBar(const UIContext &ctx, TopBarFlags flags, std::string_view title, if (!title.empty()) { TextView *titleView = Add(new TextView(title, ALIGN_VCENTER, false, new LinearLayoutParams(1.0f, Gravity::G_VCENTER))); - titleView->SetTextColor(ctx.GetTheme().itemDownStyle.fgColor); + titleView->SetTextColor(ctx.GetTheme().itemStyle.fgColor); titleView->SetBig(true); // If using HCENTER, to balance the centering, add a spacer on the right. // Add(new Spacer(50.0f)); @@ -128,7 +128,8 @@ private: int textureHeight_ = 0; }; -PaneTitleBar::PaneTitleBar(const Path &gamePath, std::string_view title, const std::string_view settingsCategory, UI::LayoutParams *layoutParams) : UI::LinearLayout(ORIENT_HORIZONTAL, layoutParams), gamePath_(gamePath) { +PaneTitleBar::PaneTitleBar(const Path &gamePath, std::string_view title, const std::string_view settingsCategory, UI::LayoutParams *layoutParams) + : UI::LinearLayout(ORIENT_HORIZONTAL, layoutParams), gamePath_(gamePath) { using namespace UI; SetSpacing(10.0f); if (!layoutParams) { diff --git a/UI/TabbedDialogScreen.cpp b/UI/TabbedDialogScreen.cpp index e9f425100d..0ca81eecb8 100644 --- a/UI/TabbedDialogScreen.cpp +++ b/UI/TabbedDialogScreen.cpp @@ -31,7 +31,7 @@ void UITabbedBaseDialogScreen::AddTab(const char *tag, std::string_view title, I if (dialogFlags & TabDialogFlags::AddAutoTitles) { auto di = GetI18NCategory(I18NCat::DIALOG); - contents->Add(new PaneTitleBar(gamePath, cachedTitle, "", new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); + contents->Add(new PaneTitleBar(gamePath, cachedTitle, "")); } createCallback(contents);