Fix layout

This commit is contained in:
Soreepeong 2024-02-25 05:59:38 +09:00
parent 8d15dfc031
commit 97066b7442

View file

@ -227,7 +227,9 @@ internal sealed class ActiveNotification : IActiveNotification, IDisposable
var unboundedWidth = NotificationConstants.ScaledWindowPadding * 3;
unboundedWidth += NotificationConstants.ScaledIconSize;
unboundedWidth += Math.Max(
ImGui.CalcTextSize(this.Title ?? this.DefaultTitle ?? string.Empty).X,
Math.Max(
ImGui.CalcTextSize(this.Title ?? this.DefaultTitle ?? string.Empty).X,
ImGui.CalcTextSize(this.InitiatorPlugin?.Name ?? NotificationConstants.DefaultInitiator).X),
ImGui.CalcTextSize(this.Content).X);
var width = Math.Min(maxWidth, unboundedWidth);