diff --git a/PartPreviewWindow/PlusTab/ExplorePanel.cs b/PartPreviewWindow/PlusTab/ExplorePanel.cs index 7bc09d9ed..03ce42329 100644 --- a/PartPreviewWindow/PlusTab/ExplorePanel.cs +++ b/PartPreviewWindow/PlusTab/ExplorePanel.cs @@ -256,8 +256,34 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab { foreach (var content in contentList.Content) { - switch (content.content_type) + switch (content.content_type) { + case "banner_image": + { + if ((content.theme_filter == "dark" && ActiveTheme.Instance.IsDarkTheme) + || (content.theme_filter == "light" && !ActiveTheme.Instance.IsDarkTheme)) + { + ImageBuffer image = new ImageBuffer(640, 480); + ResponsiveImageWidget imageWidget = new ResponsiveImageWidget(image) + { + Margin = new BorderDouble(5), + }; + + if (content.link != null) + { + imageWidget.Cursor = Cursors.Hand; + imageWidget.Click += (s, e) => + { + ApplicationController.Instance.LaunchBrowser(content.link); + }; + } + + imageWidget.Load += (s, e) => ApplicationController.Instance.DownloadToImageAsync(image, content.image_url, false, new BlenderPreMultBGRA()); + topToBottom.AddChild(imageWidget); + } + } + break; + case "article_group": case "product_group": topToBottom.AddChild(new ExploreSection(content, theme)); diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 9d4a2ac1a..44ce9ce3f 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 9d4a2ac1a2a1fc44ecf5a551cde59db213c334de +Subproject commit 44ce9ce3f64b93cf8f103fda679cf1ca275d8b3e