fix(themes): drop legacy StyleModel push from chat log and pop-out

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.
This commit is contained in:
2026-05-05 14:23:41 +02:00
parent abcd0847ef
commit c943a2cff3
2 changed files with 9 additions and 44 deletions
+5 -23
View File
@@ -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()
+4 -21
View File
@@ -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()