diff --git a/HellionChat/Util/ImGuiUtil.cs b/HellionChat/Util/ImGuiUtil.cs index 96cd830..4db4141 100755 --- a/HellionChat/Util/ImGuiUtil.cs +++ b/HellionChat/Util/ImGuiUtil.cs @@ -254,6 +254,17 @@ internal static class ImGuiUtil return end; } + // --------------------------------------------------------------- + // Inspired by ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12). + // Upstream dropped the width parameter (no callers there); we keep + // it because two ChatLogWindow header buttons size themselves to + // match the ChannelIcon button's frame. The actual bug is the + // manual size = width - 2 * CellPadding.X subtraction: CellPadding + // scales with HUD scale, the raw int does not, so the button + // shrank under high HUD scales. ImGui.Button already handles its + // own frame padding internally — pass the measured width straight + // through. + // --------------------------------------------------------------- internal static bool IconButton( FontAwesomeIcon icon, string? id = null, @@ -268,10 +279,7 @@ internal static class ImGuiUtil bool ret; using (Plugin.FontManager.FontAwesome.Push()) { - var size = Vector2.Zero; - if (width > 0) - size.X = width - 2 * ImGui.GetStyle().CellPadding.X; - + var size = width > 0 ? new Vector2(width, 0f) : Vector2.Zero; ret = ImGui.Button(label, size); }