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; 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() public override void PreDraw()
{ {
if (Plugin.Config.KeepInputFocus && Activate) if (Plugin.Config.KeepInputFocus && Activate)
ImGui.SetWindowFocus(WindowName); ImGui.SetWindowFocus(WindowName);
_pushedStyle = null; // Hellion Chat v1.1.0+ — Theme-Engine ist Source-of-Truth, kein
if (Plugin.Config is { OverrideStyle: true, ChosenStyle: not null }) // zusätzlicher Dalamud-StyleModel-Override mehr pro Window. Plugin.Draw
{ // pusht das aktive Hellion-Theme global; ChatLogWindow zeichnet sich
var style = StyleModel.GetConfiguredStyles()?.FirstOrDefault(s => s.Name == Plugin.Config.ChosenStyle); // damit konsistent zu Settings/Pop-Out/Wizard. Wer den Upstream-Look
if (style != null) // will, wählt das Built-In-Theme "Chat 2 Klassik" in Settings → Themes.
{
style.Push();
_pushedStyle = style;
}
}
} }
public override void PostDraw() public override void PostDraw()
@@ -553,12 +541,6 @@ public sealed class ChatLogWindow : Window
// doesn't get called if the input is disabled. // doesn't get called if the input is disabled.
if (Plugin.CurrentTab.InputDisabled) if (Plugin.CurrentTab.InputDisabled)
Activate = false; Activate = false;
if (_pushedStyle != null)
{
_pushedStyle.Pop();
_pushedStyle = null;
}
} }
public override void OnClose() public override void OnClose()
+4 -21
View File
@@ -65,23 +65,12 @@ internal class Popout : Window
return FrameTime - lastActivityTime <= 1000 * Plugin.Config.InactivityHideTimeout; 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() public override void PreDraw()
{ {
_pushedStyle = null; // Hellion Chat v1.1.0+ — Theme-Engine ist Source-of-Truth, kein
if (Plugin.Config is { OverrideStyle: true, ChosenStyle: not null }) // zusätzlicher Dalamud-StyleModel-Override mehr pro Window. Plugin.Draw
{ // pusht das aktive Hellion-Theme global; Pop-Out zeichnet sich damit
var style = StyleModel.GetConfiguredStyles()?.FirstOrDefault(s => s.Name == Plugin.Config.ChosenStyle); // konsistent zum Haupt-Chat-Window.
if (style != null)
{
style.Push();
_pushedStyle = style;
}
}
Flags = ImGuiWindowFlags.None; Flags = ImGuiWindowFlags.None;
if (!Plugin.Config.ShowPopOutTitleBar) if (!Plugin.Config.ShowPopOutTitleBar)
Flags |= ImGuiWindowFlags.NoTitleBar; Flags |= ImGuiWindowFlags.NoTitleBar;
@@ -210,12 +199,6 @@ internal class Popout : Window
{ {
if (Idx >= 0 && Idx < ChatLogWindow.PopOutDocked.Count) if (Idx >= 0 && Idx < ChatLogWindow.PopOutDocked.Count)
ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked(); ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked();
if (_pushedStyle != null)
{
_pushedStyle.Pop();
_pushedStyle = null;
}
} }
public override void OnClose() public override void OnClose()