From 0717b1f7c0a735b73c3659a15847ab2c2793f559 Mon Sep 17 00:00:00 2001 From: JordanTheToaster Date: Wed, 12 Jun 2024 01:15:11 +0100 Subject: [PATCH] FullscreenUI: Fix incorrect padding calculation in pause menu Fixes scrollbars appearing in menu. --- pcsx2/ImGui/ImGuiFullscreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/ImGui/ImGuiFullscreen.cpp b/pcsx2/ImGui/ImGuiFullscreen.cpp index 0293be2cf0..709fec77aa 100644 --- a/pcsx2/ImGui/ImGuiFullscreen.cpp +++ b/pcsx2/ImGui/ImGuiFullscreen.cpp @@ -846,8 +846,8 @@ void ImGuiFullscreen::BeginMenuButtons(u32 num_items, float y_align, float x_pad if (y_align != 0.0f) { - const float total_size = - static_cast(num_items) * LayoutScale(item_height + (y_padding * 2.0f)) + LayoutScale(y_padding * 2.0f); + const float real_item_height = LayoutScale(item_height) + (LayoutScale(y_padding) * 2.0f); + const float total_size = (static_cast(num_items) * real_item_height) + (LayoutScale(y_padding) * 2.0f); const float window_height = ImGui::GetWindowHeight(); if (window_height > total_size) ImGui::SetCursorPosY((window_height - total_size) * y_align);