Apply TitleBgActive coloring when minimized and focused

Window-System applicable only
This commit is contained in:
Raymond 2021-10-17 19:47:55 -04:00
parent 22810a1093
commit 339009a2fc

View file

@ -193,12 +193,25 @@ namespace Dalamud.Interface.Windowing
this.OnOpen();
}
var wasFocused = this.IsFocused;
if (wasFocused)
{
var style = ImGui.GetStyle();
var focusedHeaderColor = style.Colors[(int)ImGuiCol.TitleBgActive];
ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, focusedHeaderColor);
}
if (ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags))
{
// Draw the actual window contents
this.Draw();
}
if (wasFocused)
{
ImGui.PopStyleColor();
}
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];