Fix button alignment when no drag/drop button is visible
This commit is contained in:
parent
89951227af
commit
c30abb79ab
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
|
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>5.2</Version>
|
<Version>5.3</Version>
|
||||||
<OutputPath>dist</OutputPath>
|
<OutputPath>dist</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -153,7 +153,11 @@ internal sealed class ConfigWindow : LWindow
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui.SameLine(0, 58);
|
ImGui.PushFont(UiBuilder.IconFont);
|
||||||
|
ImGui.SameLine(0,
|
||||||
|
ImGui.CalcTextSize(FontAwesomeIcon.ArrowsUpDown.ToIconString()).X +
|
||||||
|
ImGui.GetStyle().FramePadding.X * 2 + ImGui.GetStyle().ItemSpacing.X * 2);
|
||||||
|
ImGui.PopFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGuiComponents.IconButton($"##Remove{i}", FontAwesomeIcon.Times))
|
if (ImGuiComponents.IconButton($"##Remove{i}", FontAwesomeIcon.Times))
|
||||||
@ -202,7 +206,8 @@ internal sealed class ConfigWindow : LWindow
|
|||||||
|
|
||||||
var (topLeft, bottomRight) = itemPositions[oldIndex];
|
var (topLeft, bottomRight) = itemPositions[oldIndex];
|
||||||
topLeft += new Vector2(MainIndentSize, 0);
|
topLeft += new Vector2(MainIndentSize, 0);
|
||||||
ImGui.GetWindowDrawList().AddRect(topLeft, bottomRight, ImGui.GetColorU32(ImGuiColors.DalamudGrey), 3f, ImDrawFlags.RoundCornersAll);
|
ImGui.GetWindowDrawList().AddRect(topLeft, bottomRight, ImGui.GetColorU32(ImGuiColors.DalamudGrey), 3f,
|
||||||
|
ImDrawFlags.RoundCornersAll);
|
||||||
|
|
||||||
int newIndex = itemPositions.IndexOf(x => ImGui.IsMouseHoveringRect(x.TopLeft, x.BottomRight, true));
|
int newIndex = itemPositions.IndexOf(x => ImGui.IsMouseHoveringRect(x.TopLeft, x.BottomRight, true));
|
||||||
if (newIndex >= 0 && oldIndex != newIndex)
|
if (newIndex >= 0 && oldIndex != newIndex)
|
||||||
|
Loading…
Reference in New Issue
Block a user