From 3fc42963aef9f683cd0cc5e95165336d8a7195c5 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Sat, 2 May 2026 21:22:36 +0200 Subject: [PATCH] feat(autotell): dim selection background of greeted tabs The text-disabled colour alone made greeted tabs visually weak in the sidebar. Push dimmed Header and HeaderHovered values alongside the existing Text push so the selected and hovered states match the greeted state too. Idle state stays untouched because ImGui Selectable has no idle background slot. --- ChatTwo/Ui/ChatLogWindow.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index 1e60ba8..a9559c3 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -1374,8 +1374,18 @@ public sealed class ChatLogWindow : Window { // Dim the tab name once the user marked the partner // as greeted, so a glance at the sidebar tells them - // who still needs attention. + // who still needs attention. Selectable has no idle + // background slot in ImGui, so the dim only applies + // to the selected and hovered states — the text dim + // alone signals greeted in the idle state. + var headerBase = ImGui.GetColorU32(ImGuiCol.Header); + var hoverBase = ImGui.GetColorU32(ImGuiCol.HeaderHovered); + var dimHeader = (headerBase & 0xFF000000u) | ((headerBase & 0x00FEFEFEu) >> 1); + var dimHover = (hoverBase & 0xFF000000u) | ((hoverBase & 0x00FEFEFEu) >> 1); + using (ImRaii.PushColor(ImGuiCol.Text, ImGui.GetColorU32(ImGuiCol.TextDisabled))) + using (ImRaii.PushColor(ImGuiCol.Header, dimHeader)) + using (ImRaii.PushColor(ImGuiCol.HeaderHovered, dimHover)) { clicked = ImGui.Selectable(selectableLabel, isCurrentTab); }