Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: window style fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 27, 2024
1 parent 2e91e36 commit 35d3e81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
2 changes: 2 additions & 0 deletions ActionTimelineEx/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class Plugin : IDalamudPlugin
{ 13409, 1 }, //RDM Embolden.

{ 12699, 1 }, //SMN 2703.

{ 13808, 1 }, //PCT Starry Muse
};
public static Settings Settings { get; private set; } = null!;

Expand Down
3 changes: 1 addition & 2 deletions ActionTimelineEx/Timeline/TimelineManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ActionTimelineEx;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Hooking;
using Dalamud.Utility.Signatures;
using ECommons.DalamudServices;
Expand Down
8 changes: 2 additions & 6 deletions ActionTimelineEx/Windows/RotationHelperWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public static void Draw()
using var bgColorPush = ImRaii.PushColor(ImGuiCol.WindowBg, bgColor);

ImGui.SetNextWindowSize(new Vector2(560, 100) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
using var border = ImRaii.PushStyle(ImGuiStyleVar.WindowBorderSize, 0);
using var padding = ImRaii.PushStyle(ImGuiStyleVar.WindowPadding, Vector2.Zero);

if (ImGui.Begin("Rotation Helper Window", flag))
{
Expand All @@ -49,19 +51,13 @@ public static void Draw()
}

var heightReduce = ImGui.GetCursorPosY();
var padding = ImGui.GetStyle().WindowPadding;
var border = ImGui.GetStyle().WindowBorderSize;
ImGui.GetStyle().WindowPadding = default;
ImGui.GetStyle().WindowBorderSize = 0;
try
{
RotationHelper.RotationSetting.Draw(heightReduce);
}
finally
{
ImGui.End();
ImGui.GetStyle().WindowPadding = padding;
ImGui.GetStyle().WindowBorderSize = border;
}
}
}
Expand Down
9 changes: 2 additions & 7 deletions ActionTimelineEx/Windows/TimelineWindow.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ActionTimelineEx.Configurations;
using ActionTimelineEx.Helpers;
using ActionTimelineEx.Timeline;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
Expand Down Expand Up @@ -31,22 +30,18 @@ public static void Draw(DrawingSettings setting, int index)

ImGui.SetNextWindowSize(new Vector2(560, 100) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
ImGui.SetNextWindowPos(new Vector2(200, 200) * ImGuiHelpers.GlobalScale, ImGuiCond.FirstUseEver);
using var border = ImRaii.PushStyle(ImGuiStyleVar.WindowBorderSize, 0);
using var padding = ImRaii.PushStyle(ImGuiStyleVar.WindowPadding, Vector2.Zero);

if (ImGui.Begin($"Timeline: {index}", flag))
{
var padding = ImGui.GetStyle().WindowPadding;
var border = ImGui.GetStyle().WindowBorderSize;
ImGui.GetStyle().WindowPadding = default;
ImGui.GetStyle().WindowBorderSize = 0;
try
{
DrawContent(setting);
}
finally
{
ImGui.End();
ImGui.GetStyle().WindowPadding = padding;
ImGui.GetStyle().WindowBorderSize = border;
}
}
}
Expand Down

0 comments on commit 35d3e81

Please sign in to comment.