Skip to content

Commit

Permalink
FullscreenUI: Fix incorrect padding calculation in pause menu
Browse files Browse the repository at this point in the history
Fixes scrollbars appearing in menu.
  • Loading branch information
JordanTheToaster authored and stenzek committed Jun 12, 2024
1 parent 7ad27e6 commit 0717b1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcsx2/ImGui/ImGuiFullscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(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<float>(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);
Expand Down

0 comments on commit 0717b1f

Please sign in to comment.