From 42cd80c1721211d8d43e7ec78f6d5903e1048493 Mon Sep 17 00:00:00 2001 From: Rares-Alexandru Fodor Date: Sun, 13 Apr 2025 19:34:27 +0300 Subject: [PATCH] UI: Fix vertical alignment of achievement progress text --- pcsx2/Achievements.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcsx2/Achievements.cpp b/pcsx2/Achievements.cpp index 80a2ae28bc..39b6d260e8 100644 --- a/pcsx2/Achievements.cpp +++ b/pcsx2/Achievements.cpp @@ -2266,7 +2266,9 @@ void Achievements::DrawAchievementsWindow() ImGui::GetColorU32(ImGuiFullscreen::UISecondaryColor)); text.format("{}%", static_cast(std::round(fraction * 100.0f))); + ImGui::PushFont(g_medium_font); text_size = ImGui::CalcTextSize(text.c_str(), text.end_ptr()); + ImGui::PopFont(); const ImVec2 text_pos(progress_bb.Min.x + ((progress_bb.Max.x - progress_bb.Min.x) / 2.0f) - (text_size.x / 2.0f), progress_bb.Min.y + ((progress_bb.Max.y - progress_bb.Min.y) / 2.0f) - (text_size.y / 2.0f)); dl->AddText(g_medium_font, g_medium_font->FontSize, text_pos, ImGui::GetColorU32(ImGuiFullscreen::UIPrimaryTextColor),