mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 18:15:42 -04:00
FullscreenUI: Fix incorrect padding calculation in pause menu
Fixes scrollbars appearing in menu.
This commit is contained in:
parent
b464b6d668
commit
bac2ac0151
@ -863,8 +863,8 @@ void ImGuiFullscreen::BeginMenuButtons(u32 num_items, float y_align, float x_pad
|
|||||||
|
|
||||||
if (y_align != 0.0f)
|
if (y_align != 0.0f)
|
||||||
{
|
{
|
||||||
const float total_size =
|
const float real_item_height = LayoutScale(item_height) + (LayoutScale(y_padding) * 2.0f);
|
||||||
static_cast<float>(num_items) * LayoutScale(item_height + (y_padding * 2.0f)) + 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();
|
const float window_height = ImGui::GetWindowHeight();
|
||||||
if (window_height > total_size)
|
if (window_height > total_size)
|
||||||
ImGui::SetCursorPosY((window_height - total_size) * y_align);
|
ImGui::SetCursorPosY((window_height - total_size) * y_align);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user