From 45ef8120f383337cddcef1dfd3ccca428f5c4969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 26 Oct 2025 14:36:42 +0100 Subject: [PATCH] Minor UX --- Common/UI/Context.cpp | 2 -- UI/DebugOverlay.cpp | 4 ++-- UI/MainScreen.cpp | 8 ++++---- UI/MainScreen.h | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index f049795d35..8d532b6481 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -145,8 +145,6 @@ Bounds UIContext::GetLayoutBounds() const { float top = System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_TOP); float bottom = System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_BOTTOM); - // ILOG("Insets: %f %f %f %f", left, right, top, bottom); - // Adjust left edge to compensate for cutouts (notches) if any. bounds.x += left; bounds.w -= (left + right); diff --git a/UI/DebugOverlay.cpp b/UI/DebugOverlay.cpp index 0a9e4386f2..19b64472a1 100644 --- a/UI/DebugOverlay.cpp +++ b/UI/DebugOverlay.cpp @@ -495,8 +495,8 @@ void DrawFPS(UIContext *ctx, const Bounds &bounds) { ctx->BindFontTexture(); ctx->Draw()->SetFontScale(0.7f, 0.7f); - ctx->Draw()->DrawText(ubuntu24, w.as_view(), bounds.x2() - 8, 20, 0xc0000000, ALIGN_TOPRIGHT | FLAG_DYNAMIC_ASCII); - ctx->Draw()->DrawText(ubuntu24, w.as_view(), bounds.x2() - 10, 19, 0xFF3fFF3f, ALIGN_TOPRIGHT | FLAG_DYNAMIC_ASCII); + ctx->Draw()->DrawText(ubuntu24, w.as_view(), bounds.x2() - 8, bounds.y + 10, 0xc0000000, ALIGN_TOPRIGHT | FLAG_DYNAMIC_ASCII); + ctx->Draw()->DrawText(ubuntu24, w.as_view(), bounds.x2() - 10, bounds.y + 8, 0xFF3fFF3f, ALIGN_TOPRIGHT | FLAG_DYNAMIC_ASCII); ctx->Draw()->SetFontScale(1.0f, 1.0f); ctx->Flush(); ctx->RebindTexture(); diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 6ea5d06b27..416eb8eca7 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -1128,7 +1128,7 @@ GameBrowser *MainScreen::CreateBrowserTab(const Path &path, std::string_view tit return gameBrowser; } -UI::ViewGroup *MainScreen::CreateLogoView(UI::LayoutParams *layoutParams) { +UI::ViewGroup *MainScreen::CreateLogoView(bool portrait, UI::LayoutParams *layoutParams) { using namespace UI; AnchorLayout *logos = new AnchorLayout(layoutParams); if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { @@ -1156,7 +1156,7 @@ UI::ViewGroup *MainScreen::CreateLogoView(UI::LayoutParams *layoutParams) { ver->SetClip(false); // Only allow copying the version if it looks like a git version string. 1.19 for example is not really necessary to be able to copy/paste. - if (strchr(PPSSPP_GIT_VERSION, '-')) { + if (!portrait && strchr(PPSSPP_GIT_VERSION, '-')) { ver->OnClick.Add([](UI::EventParams &e) { auto di = GetI18NCategory(I18NCat::DIALOG); System_CopyStringToClipboard(PPSSPP_GIT_VERSION); @@ -1298,7 +1298,7 @@ void MainScreen::CreateViews() { if (vertical) { LinearLayout *header = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); header->SetSpacing(5.0f); - header->Add(CreateLogoView(new LinearLayoutParams(WRAP_CONTENT, 80.0f, false))); + header->Add(CreateLogoView(true, new LinearLayoutParams(WRAP_CONTENT, 80.0f, false))); LinearLayout *buttonGroup = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT, 1.0f, UI::Gravity::G_VCENTER, UI::Margins(0,0,8,0))); @@ -1317,7 +1317,7 @@ void MainScreen::CreateViews() { ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins)); LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); rightColumnItems->SetSpacing(0.0f); - ViewGroup *logo = CreateLogoView(new LinearLayoutParams(FILL_PARENT, 80.0f, false)); + ViewGroup *logo = CreateLogoView(false, new LinearLayoutParams(FILL_PARENT, 80.0f)); #if !defined(MOBILE_DEVICE) auto gr = GetI18NCategory(I18NCat::GRAPHICS); ImageID icon(g_Config.UseFullScreen() ? "I_RESTORE" : "I_FULLSCREEN"); diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 358c60fca2..ed918b6142 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -136,7 +136,7 @@ protected: void CreateViews() override; void CreateRecentTab(); GameBrowser *CreateBrowserTab(const Path &path, std::string_view title, std::string_view howToTitle, std::string_view howToUri, BrowseFlags browseFlags, bool *bGridView, float *scrollPos); - UI::ViewGroup *CreateLogoView(UI::LayoutParams *layoutParams); + UI::ViewGroup *CreateLogoView(bool portrait, UI::LayoutParams *layoutParams); void CreateMainButtons(UI::ViewGroup *parent, bool vertical); void DrawBackground(UIContext &dc) override;