From c943a2cff3b8612ac5f2b46931e9fa76822ca834 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Tue, 5 May 2026 14:23:41 +0200 Subject: [PATCH] fix(themes): drop legacy StyleModel push from chat log and pop-out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pre-engine StyleModel override in ChatLogWindow.PreDraw and Popout.PreDraw was layering an extra Dalamud style on top of the Hellion theme, locally tinting the chat window back to a non-Hellion look while every other plugin window rendered correctly. Theme is now the single source of truth — pick chat2-classic for the upstream flavour. --- HellionChat/Ui/ChatLogWindow.cs | 28 +++++----------------------- HellionChat/Ui/Popout.cs | 25 ++++--------------------- 2 files changed, 9 insertions(+), 44 deletions(-) diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index f5fda68..5949104 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -521,28 +521,16 @@ public sealed class ChatLogWindow : Window return FrameTime - lastActivityTime <= 1000 * Plugin.Config.InactivityHideTimeout; } - // Tracks the style instance pushed in PreDraw so PostDraw can pop the same - // one even if the user toggled OverrideStyle / ChosenStyle mid-frame. - // Without this, a config change between PreDraw and PostDraw could either - // leak a Push (no matching Pop) or pop nothing while we still have a frame - // pushed onto the ImGui stack. - private StyleModel? _pushedStyle; - public override void PreDraw() { if (Plugin.Config.KeepInputFocus && Activate) ImGui.SetWindowFocus(WindowName); - _pushedStyle = null; - if (Plugin.Config is { OverrideStyle: true, ChosenStyle: not null }) - { - var style = StyleModel.GetConfiguredStyles()?.FirstOrDefault(s => s.Name == Plugin.Config.ChosenStyle); - if (style != null) - { - style.Push(); - _pushedStyle = style; - } - } + // Hellion Chat v1.1.0+ — Theme-Engine ist Source-of-Truth, kein + // zusätzlicher Dalamud-StyleModel-Override mehr pro Window. Plugin.Draw + // pusht das aktive Hellion-Theme global; ChatLogWindow zeichnet sich + // damit konsistent zu Settings/Pop-Out/Wizard. Wer den Upstream-Look + // will, wählt das Built-In-Theme "Chat 2 Klassik" in Settings → Themes. } public override void PostDraw() @@ -553,12 +541,6 @@ public sealed class ChatLogWindow : Window // doesn't get called if the input is disabled. if (Plugin.CurrentTab.InputDisabled) Activate = false; - - if (_pushedStyle != null) - { - _pushedStyle.Pop(); - _pushedStyle = null; - } } public override void OnClose() diff --git a/HellionChat/Ui/Popout.cs b/HellionChat/Ui/Popout.cs index f86c980..dc10cd2 100644 --- a/HellionChat/Ui/Popout.cs +++ b/HellionChat/Ui/Popout.cs @@ -65,23 +65,12 @@ internal class Popout : Window return FrameTime - lastActivityTime <= 1000 * Plugin.Config.InactivityHideTimeout; } - // Tracks the style instance pushed in PreDraw so PostDraw pops the same - // one even if config changes mid-frame. See AUDIT-2026-05-05 [CR-UI-5]. - private StyleModel? _pushedStyle; - public override void PreDraw() { - _pushedStyle = null; - if (Plugin.Config is { OverrideStyle: true, ChosenStyle: not null }) - { - var style = StyleModel.GetConfiguredStyles()?.FirstOrDefault(s => s.Name == Plugin.Config.ChosenStyle); - if (style != null) - { - style.Push(); - _pushedStyle = style; - } - } - + // Hellion Chat v1.1.0+ — Theme-Engine ist Source-of-Truth, kein + // zusätzlicher Dalamud-StyleModel-Override mehr pro Window. Plugin.Draw + // pusht das aktive Hellion-Theme global; Pop-Out zeichnet sich damit + // konsistent zum Haupt-Chat-Window. Flags = ImGuiWindowFlags.None; if (!Plugin.Config.ShowPopOutTitleBar) Flags |= ImGuiWindowFlags.NoTitleBar; @@ -210,12 +199,6 @@ internal class Popout : Window { if (Idx >= 0 && Idx < ChatLogWindow.PopOutDocked.Count) ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked(); - - if (_pushedStyle != null) - { - _pushedStyle.Pop(); - _pushedStyle = null; - } } public override void OnClose()