fix: set NoBackground on scrolling child

This commit is contained in:
goat 2021-08-09 21:14:34 +02:00
parent b7c5942468
commit d23ed9020a
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -1022,7 +1022,7 @@ namespace Dalamud.Interface.Internal.Windows
ImGui.PushStyleVar(ImGuiStyleVar.ScrollbarSize, 15);
ImGui.PushStyleColor(ImGuiCol.ScrollbarBg, Vector4.Zero);
if (ImGui.BeginChild($"plugin{index}Scrolling", new Vector2(0, (PluginImageHeight / thumbFactor) + ImGui.GetStyle().ScrollbarSize), false, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoScrollWithMouse))
if (ImGui.BeginChild($"plugin{index}ImageScrolling", new Vector2(0, (PluginImageHeight / thumbFactor) + ImGui.GetStyle().ScrollbarSize), false, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoBackground))
{
if (images.Textures != null && images.Textures is { Length: > 0 })
{
@ -1175,7 +1175,7 @@ namespace Dalamud.Interface.Internal.Windows
this.errorModalOnNextFrame = true;
}
private async Task DownloadPluginIcon(PluginManifest manifest)
private async Task DownloadPluginIconAsync(PluginManifest manifest)
{
var client = new HttpClient();
@ -1221,27 +1221,23 @@ namespace Dalamud.Interface.Internal.Windows
data.EnsureSuccessStatusCode();
var image = this.dalamud.InterfaceManager.LoadImage(await data.Content.ReadAsByteArrayAsync());
if (image != null)
{
if (image.Height != PluginImageHeight || image.Width != PluginImageWidth)
{
Log.Error($"Image at {manifest.ImageUrls[i]} was not of the correct resolution.");
return;
}
pluginImages[i] = image;
}
else
if (image == null)
{
return;
}
if (image.Height != PluginImageHeight || image.Width != PluginImageWidth)
{
Log.Error($"Image at {manifest.ImageUrls[i]} was not of the correct resolution.");
return;
}
pluginImages[i] = image;
}
this.pluginImagesMap[manifest.InternalName] = (true, pluginImages);
}
Log.Verbose($"Plugin images for {manifest.InternalName} downloaded");
}