diff --git a/MatterControlLib/PartPreviewWindow/ViewControls3D.cs b/MatterControlLib/PartPreviewWindow/ViewControls3D.cs index 81d2242f9..33ef410a2 100644 --- a/MatterControlLib/PartPreviewWindow/ViewControls3D.cs +++ b/MatterControlLib/PartPreviewWindow/ViewControls3D.cs @@ -387,20 +387,24 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Padding = new BorderDouble(theme.DefaultContainerPadding / 2, 0) }; - var height = view3DWidget.Height - theme.DefaultContainerPadding; + var systemWindow = this.Parents().FirstOrDefault(); var printLibraryWidget = new PrintLibraryWidget(partPreviewContent, theme) { - HAnchor = HAnchor.Absolute, - VAnchor = VAnchor.Absolute, - Height = height, + HAnchor = HAnchor.Left, + VAnchor = VAnchor.Bottom, + Height = libraryPopup.TransformToScreenSpace(libraryPopup.Position).Y, Width = 400, - MinimumSize = new Vector2(400, height) + MinimumSize = new Vector2(400, 50) + }; + + systemWindow.SizeChanged += (s, e) => + { + printLibraryWidget.Height = libraryPopup.TransformToScreenSpace(libraryPopup.Position).Y; }; widget.AddChild(printLibraryWidget); - var systemWindow = this.Parents().FirstOrDefault(); systemWindow.MouseDown += mouseDown; void mouseDown(object s2, MouseEventArgs mouseEvent) diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index d4ff23034..21c3798b6 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit d4ff2303460508cd56ef4d6a6f6a070fbff14172 +Subproject commit 21c3798b6ffcf5f5a943181171c31b2ce08bf723