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.
This commit is contained in:
2026-05-02 21:22:36 +02:00
parent 7c52e890e6
commit 3fc42963ae
+11 -1
View File
@@ -1374,8 +1374,18 @@ public sealed class ChatLogWindow : Window
{ {
// Dim the tab name once the user marked the partner // Dim the tab name once the user marked the partner
// as greeted, so a glance at the sidebar tells them // 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.Text, ImGui.GetColorU32(ImGuiCol.TextDisabled)))
using (ImRaii.PushColor(ImGuiCol.Header, dimHeader))
using (ImRaii.PushColor(ImGuiCol.HeaderHovered, dimHover))
{ {
clicked = ImGui.Selectable(selectableLabel, isCurrentTab); clicked = ImGui.Selectable(selectableLabel, isCurrentTab);
} }