diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index 0e90f83..9bb1f79 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -1637,17 +1637,21 @@ public sealed class ChatLogWindow : Window continue; // Active-tab underline pill (2px accent). No native ImGui underline API, - // so we use a direct DrawList pass. + // so we use a direct DrawList pass. Pill height scales with GlobalScale + // and all coordinates round to physical pixels so the line stays crisp + // on 125/150% DPI setups instead of bleeding into a sub-pixel blur. { var theme = Plugin.ThemeRegistry.Active; var min = ImGui.GetItemRectMin(); var max = ImGui.GetItemRectMax(); - const float pillHeight = 2f; + var pillHeight = MathF.Max(1f, MathF.Round(2f * ImGuiHelpers.GlobalScale)); + var yBottom = MathF.Round(max.Y); + var yTop = yBottom - pillHeight; ImGui .GetWindowDrawList() .AddRectFilled( - new Vector2(min.X, max.Y - pillHeight), - new Vector2(max.X, max.Y), + new Vector2(MathF.Round(min.X), yTop), + new Vector2(MathF.Round(max.X), yBottom), ColourUtil.RgbaToAbgr(theme.Colors.Accent) ); }