diff --git a/HellionChat/Ui/Components/Sidebar.cs b/HellionChat/Ui/Components/Sidebar.cs index 0886e1d..e52ec21 100644 --- a/HellionChat/Ui/Components/Sidebar.cs +++ b/HellionChat/Ui/Components/Sidebar.cs @@ -6,6 +6,7 @@ using HellionChat.Code; using HellionChat.Resources; using HellionChat.Themes; using HellionChat.Ui.StyleEngine; +using HellionChat.Ui.StyleEngine.Widgets; using HellionChat.Util; using Microsoft.Extensions.Logging; @@ -66,6 +67,7 @@ internal sealed class Sidebar private readonly ThemeRegistry _themes; private readonly TokenResolver _resolver; + private readonly WidgetPalette _palette; private readonly FontManager _fonts; private readonly ILogger _logger; private readonly Windows.ChannelPopoutPool _pool; @@ -80,6 +82,7 @@ internal sealed class Sidebar { _themes = themes; _resolver = resolver; + _palette = new WidgetPalette(resolver); _fonts = fonts; _logger = logger; _pool = pool; @@ -181,18 +184,23 @@ internal sealed class Sidebar } } - // Section transition marker (1.5.6 parity): the separator always renders, - // compact mode suppresses only the header text. Real cursor-advancing - // widgets on purpose — rows advance the cursor via InvisibleButton, so a - // drawlist-only header would overlap the next row. + // Section transition marker (1.5.6 parity): the rule always renders, compact + // mode suppresses only the caption. LineDivider submits its own layout item + // and carries its own padding, which is what lets the rows below sit flush + // without the header collapsing onto them. private void DrawSectionHeader(string header, int count) { - ImGui.Separator(); - if (Plugin.Config.AutoTellTabsCompactDisplay) - return; + var colors = _themes.Active.Colors; + var compact = Plugin.Config.AutoTellTabsCompactDisplay; - ImGui.TextDisabled($"{header} ({count})"); - LastDrawnSectionHeaderCount++; + LineDivider.Draw( + compact ? null : $"{header} ({count})", + _palette.Abgr(Token.Border, colors), + _palette.Abgr(Token.TextMuted, colors) + ); + + if (!compact) + LastDrawnSectionHeaderCount++; } private void DrawRow(