Update icon alignment
This commit is contained in:
parent
a8861ce40a
commit
e7f5017cbf
@ -27,7 +27,7 @@ partial class LImGui
|
||||
private static float _headerCurrentPos = 0;
|
||||
private static float _headerImGuiButtonWidth = 0;
|
||||
|
||||
public static bool AddHeaderIcon(DalamudPluginInterface pluginInterface, string id, FontAwesomeIcon icon, HeaderIconOptions options = null)
|
||||
public static bool AddHeaderIcon(DalamudPluginInterface pluginInterface, string id, FontAwesomeIcon icon, HeaderIconOptions? options = null)
|
||||
{
|
||||
if (ImGui.IsWindowCollapsed()) return false;
|
||||
|
||||
@ -45,6 +45,13 @@ partial class LImGui
|
||||
_headerImGuiButtonWidth += 17 * scale;
|
||||
if (!GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.NoCollapse))
|
||||
_headerImGuiButtonWidth += 17 * scale;
|
||||
|
||||
if (!CurrentWindowHasCloseButton() &&
|
||||
GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.NoCollapse) &&
|
||||
GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.AlwaysAutoResize))
|
||||
_headerImGuiButtonWidth += 5 * scale;
|
||||
else
|
||||
_headerImGuiButtonWidth += 10 * scale;
|
||||
}
|
||||
|
||||
options ??= new();
|
||||
|
@ -12,17 +12,15 @@ public static partial class LImGui
|
||||
{
|
||||
if (AddHeaderIcon(pluginInterface, "##Patreon", FontAwesomeIcon.Heart, new HeaderIconOptions
|
||||
{
|
||||
Tooltip = "Open Liza's page on Patreon",
|
||||
Color = 0xFF000FF,
|
||||
Offset = Vector2.Zero,
|
||||
MouseButton = ImGuiMouseButton.Left
|
||||
Tooltip = "Go to patreon.com/lizac",
|
||||
Color = 0xFF3030D0,
|
||||
}))
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "http://patreon.com/lizac",
|
||||
FileName = "https://www.patreon.com/lizac",
|
||||
UseShellExecute = true,
|
||||
Verb = string.Empty,
|
||||
});
|
||||
|
6
packages.lock.json
Normal file
6
packages.lock.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net7.0-windows7.0": {}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user