From 8eb5dfce85b9062ff5b34d1e5faa4a18e5b32369 Mon Sep 17 00:00:00 2001 From: KamFretoZ <14798312+kamfretoz@users.noreply.github.com> Date: Fri, 2 May 2025 23:36:05 +0700 Subject: [PATCH] Qt/FSUI: Update branding to the about section --- bin/resources/icons/AppBanner.svg | 1 + pcsx2-qt/AboutDialog.ui | 78 ++++++++++++++----------- pcsx2-qt/resources/icons/PCSX2logo.svg | 1 + pcsx2-qt/resources/icons/logo.png | Bin 1158 -> 0 bytes pcsx2-qt/resources/resources.qrc | 2 +- pcsx2/ImGui/FullscreenUI.cpp | 23 ++++++-- 6 files changed, 64 insertions(+), 41 deletions(-) create mode 100644 bin/resources/icons/AppBanner.svg create mode 100644 pcsx2-qt/resources/icons/PCSX2logo.svg delete mode 100644 pcsx2-qt/resources/icons/logo.png diff --git a/bin/resources/icons/AppBanner.svg b/bin/resources/icons/AppBanner.svg new file mode 100644 index 0000000000..f59072c4b2 --- /dev/null +++ b/bin/resources/icons/AppBanner.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/AboutDialog.ui b/pcsx2-qt/AboutDialog.ui index 154a7bad4b..55a964538d 100644 --- a/pcsx2-qt/AboutDialog.ui +++ b/pcsx2-qt/AboutDialog.ui @@ -6,8 +6,8 @@ 0 0 - 576 - 294 + 580 + 300 @@ -19,45 +19,42 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - - - 40 - 20 - + + QSizePolicy::Policy::Preferred - + - 260 - 260 + 1 + 1 - :/icons/logo.png + :/icons/PCSX2logo.svg + + + false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::Horizontal + Qt::Orientation::Horizontal - - - 40 - 20 - + + QSizePolicy::Policy::Preferred @@ -69,7 +66,7 @@ SCM Version - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -79,7 +76,7 @@ <html><head/><body><p>PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. This allows you to play PS2 games on your PC, with many additional features and benefits.</p></body></html> - Qt::AlignJustify|Qt::AlignVCenter + Qt::AlignmentFlag::AlignJustify|Qt::AlignmentFlag::AlignVCenter true @@ -89,23 +86,31 @@ - Qt::Vertical + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Minimum - 20 - 40 + 0 + 0 + + + true + + <html><head/><body><p>PlayStation 2 and PS2 are registered trademarks of Sony Interactive Entertainment. This application is not affiliated in any way with Sony Interactive Entertainment.</p></body></html> - Qt::AlignJustify|Qt::AlignVCenter + Qt::AlignmentFlag::AlignJustify|Qt::AlignmentFlag::AlignVCenter true @@ -115,12 +120,15 @@ - Qt::Vertical + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Minimum - 20 - 40 + 0 + 0 @@ -131,19 +139,22 @@ TextLabel - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::Vertical + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Minimum - 20 - 40 + 0 + 0 @@ -151,7 +162,7 @@ - QDialogButtonBox::Close + QDialogButtonBox::StandardButton::Close true @@ -162,7 +173,6 @@ - diff --git a/pcsx2-qt/resources/icons/PCSX2logo.svg b/pcsx2-qt/resources/icons/PCSX2logo.svg new file mode 100644 index 0000000000..cbc6e7b96d --- /dev/null +++ b/pcsx2-qt/resources/icons/PCSX2logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pcsx2-qt/resources/icons/logo.png b/pcsx2-qt/resources/icons/logo.png deleted file mode 100644 index 8c2e221c19d671996272cfb175a868d416b43e17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmV;11bO?3P)pLq~_S1(1Z_ z?(4cP#yZMm!O)MJH7vh^?qbPNQRJ&G?rzrFafzm6LgdhW5g9@H4*F1vg{^M4_XR_h^R~dei2iV2v1y-mNXn97QH~! z1nS|qEUY3>$NxygSR{g6P1;#JK!kdTYhviXZ;KLDgqfH=AR;^rf5qk#oUn+HR` zKyZ1HXUCYDYDkIL8v`mL*qRYx9nCK%xO5W}f|+=#hvBL&L3)gNeYVgSA`T6>G;}wV zRfMHYA{R&6#CmSQLwsRS3XHKzL^%2S(m2>f$O&vESC+O*GI^r3iB}$o{M3bKa6XLj zJtENhh(zoZiGW7k#QRCYMAm~O$?|6+*a5WGizozHU?SrI**_wpvtEuoMeI!-MCeXu z;Ypb0qo2Ic$^Ox#wo2LS+j^+au;VFUR-^0m$33K-6RjI235rLa7c=#bVT`+;0E)_8!bmU&aRU$e`s3JI* z(L{8*5_ter8Iykn&F5K1XSd;ZSz-@2IUJkNkbXEsbe1A>BCZf|4$8YiZ!hVHH7-wQ z6=6Tj7icons/black/svg/window-2-line.svg icons/black/svg/zoom-in-line.svg icons/black/svg/zoom-out-line.svg - icons/logo.png + icons/PCSX2logo.svg icons/QT.png icons/update.png icons/white/index.theme diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp index 21401226fd..c6a1855d8d 100644 --- a/pcsx2/ImGui/FullscreenUI.cpp +++ b/pcsx2/ImGui/FullscreenUI.cpp @@ -269,6 +269,7 @@ namespace FullscreenUI static std::array, static_cast(GameDatabaseSchema::Compatibility::Perfect)> s_game_compatibility_textures; + static std::shared_ptr s_banner_texture; static std::shared_ptr s_fallback_disc_texture; static std::shared_ptr s_fallback_exe_texture; static std::vector> s_cleanup_textures; @@ -1096,6 +1097,8 @@ bool FullscreenUI::LoadResources() bool FullscreenUI::LoadSvgResources() { + s_banner_texture = LoadSvgTexture("icons/AppBanner.svg", LayoutScale(500.0f, 76.0f), SvgScaling::Fit); + for (u32 i = static_cast(GameDatabaseSchema::Compatibility::Nothing); i <= static_cast(GameDatabaseSchema::Compatibility::Perfect); i++) { @@ -1109,6 +1112,7 @@ void FullscreenUI::DestroyResources() { s_fallback_exe_texture.reset(); s_fallback_disc_texture.reset(); + s_banner_texture.reset(); for (auto& tex : s_game_compatibility_textures) tex.reset(); for (auto& tex : s_cleanup_textures) @@ -7017,7 +7021,7 @@ void FullscreenUI::OpenAboutWindow() void FullscreenUI::DrawAboutWindow() { - ImGui::SetNextWindowSize(LayoutScale(1000.0f, 580.0f)); + ImGui::SetNextWindowSize(LayoutScale(1000.0f, 600.0f)); ImGui::SetNextWindowPos(ImGui::GetIO().DisplaySize * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f)); ImGui::OpenPopup(FSUI_CSTR("About PCSX2")); @@ -7027,21 +7031,24 @@ void FullscreenUI::DrawAboutWindow() if (ImGui::BeginPopupModal(FSUI_CSTR("About PCSX2"), &s_about_window_open, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize)) { + const ImVec2 image_size = LayoutScale(500.0f, 76.0f); + const ImRect image_bb(ImGui::GetCursorScreenPos(), ImGui::GetCursorScreenPos() + ImVec2(ImGui::GetCurrentWindow()->WorkRect.GetWidth(), image_size.y)); + const ImRect image_rect(CenterImage(image_bb, image_size)); + + DrawListSvgTexture(ImGui::GetWindowDrawList(), s_banner_texture.get(), image_rect.Min, image_rect.Max); + + const float indent = image_size.y + LayoutScale(12.0f); + ImGui::SetCursorPosY(ImGui::GetCursorPosY() + indent); ImGui::TextWrapped("%s", FSUI_CSTR( "PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a " "combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. " "This allows you to play PS2 games on your PC, with many additional features and benefits.")); ImGui::NewLine(); - ImGui::TextWrapped(FSUI_CSTR("Version: %s"), BuildVersion::GitRev); - ImGui::NewLine(); - ImGui::TextWrapped("%s", FSUI_CSTR("PlayStation 2 and PS2 are registered trademarks of Sony Interactive Entertainment. This application is not " "affiliated in any way with Sony Interactive Entertainment.")); - ImGui::NewLine(); - BeginMenuButtons(); if (ActiveButton(FSUI_ICONSTR(ICON_FA_GLOBE, "Website"), false)) @@ -7068,6 +7075,10 @@ void FullscreenUI::DrawAboutWindow() EndMenuButtons(); + const float alignment = image_size.x + image_size.y; + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + alignment); + ImGui::TextWrapped(FSUI_CSTR("Version: %s"), BuildVersion::GitRev); + ImGui::EndPopup(); }