FullscreenUI: Fix achievement points placement with short description

This commit is contained in:
Stenzek
2025-11-06 20:04:23 +10:00
parent d598470de2
commit 42cf66cbd7

View File

@@ -4792,9 +4792,10 @@ void FullscreenUI::DrawNotifications(ImVec2& position, float spacing)
const ImVec2 text_size = font->CalcTextSizeA(text_font_size, text_font_weight, max_text_width, max_text_width,
IMSTR_START_END(notif.text));
float box_width = std::max((horizontal_padding * 2.0f) + badge_size + horizontal_spacing +
ImCeil(std::max(title_size.x, text_size.x)),
min_width);
float box_width = std::max(
(horizontal_padding * 2.0f) + badge_size + horizontal_spacing +
ImCeil(std::max(title_size.x, text_size.x) + (notif.note.empty() ? 0.0f : (horizontal_spacing + note_size.x))),
min_width);
const float box_height =
std::max((vertical_padding * 2.0f) + ImCeil(title_size.y) + vertical_spacing + ImCeil(text_size.y), min_height);