From 737ec6b868d97e4d33698e918bbb789a4dd506d1 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Fri, 1 May 2026 21:25:13 +0200 Subject: [PATCH] Apply window opacity to ChildBg as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chat log content area is rendered as a child window, so leaving ChildBg opaque kept the inner pane fully solid even when the slider was dragged down — defeating the point during combat where the user wants to see the game behind the chat. Mix the same alpha byte into ChildBg now. FrameBg and PopupBg are deliberately left opaque so text inputs, dropdowns, tooltips and modals stay readable on top. --- ChatTwo/Ui/HellionStyle.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ChatTwo/Ui/HellionStyle.cs b/ChatTwo/Ui/HellionStyle.cs index 669e34b..28c9a36 100644 --- a/ChatTwo/Ui/HellionStyle.cs +++ b/ChatTwo/Ui/HellionStyle.cs @@ -115,11 +115,14 @@ internal static class HellionStyle { var stack = new StackHandle(); - // Mix the configured opacity into the window background color. - // Other surface layers (ChildBg, FrameBg, popups) stay opaque so - // form fields and dialogs remain easy to read on top. + // Mix the configured opacity into both the outer window and the + // inner content child backgrounds — without ChildBg following the + // slider the chat log stays opaque inside even when the user + // wants to see the game behind it during combat. Form fields and + // popups (FrameBg, PopupBg) still stay opaque so input is readable. var alphaByte = (uint)Math.Clamp((int)(windowOpacity * 255f), 0x55, 0xFF); var windowBgWithAlpha = (WindowBgRgba & 0xFFFFFF00u) | alphaByte; + var childBgWithAlpha = (ChildBgRgba & 0xFFFFFF00u) | alphaByte; // Layout — geometric edges, modest rounding, single-pixel borders. stack.PushStyleVar(ImGuiStyleVar.WindowRounding, 4f); @@ -134,7 +137,7 @@ internal static class HellionStyle // Surfaces. stack.PushColor(ImGuiCol.WindowBg, windowBgWithAlpha); - stack.PushColor(ImGuiCol.ChildBg, ChildBgRgba); + stack.PushColor(ImGuiCol.ChildBg, childBgWithAlpha); stack.PushColor(ImGuiCol.PopupBg, PopupBgRgba); stack.PushColor(ImGuiCol.Border, BorderRgba); stack.PushColor(ImGuiCol.BorderShadow, BorderShadowRgba);