fix: plugin images in children (closes #482)

This commit is contained in:
goat 2021-08-17 13:50:00 +02:00
parent adbf9b2bb0
commit ee03864c70
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -1212,9 +1212,8 @@ namespace Dalamud.Interface.Internal.Windows
var width = ImGui.GetWindowWidth();
// TODO: This doesn't work, seems like a bug
// if (ImGui.BeginChild($"plugin{index}ImageScrolling", new Vector2(width, (PluginImageHeight / thumbFactor) + scrollBarSize), false, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoBackground))
// {
if (ImGui.BeginChild($"plugin{index}ImageScrolling", new Vector2(width - (70 * ImGuiHelpers.GlobalScale), (PluginImageHeight / thumbFactor) + scrollBarSize), false, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoBackground))
{
if (images.Textures != null && images.Textures is { Length: > 0 })
{
for (var i = 0; i < images.Textures.Length; i++)
@ -1251,9 +1250,9 @@ namespace Dalamud.Interface.Internal.Windows
}
}
}
}
// ImGui.EndChild();
// }
ImGui.EndChild();
ImGui.PopStyleVar();
ImGui.PopStyleColor();