diff --git a/ApplicationView/ApplicationController.cs b/ApplicationView/ApplicationController.cs index c4642c6d6..0289de424 100644 --- a/ApplicationView/ApplicationController.cs +++ b/ApplicationView/ApplicationController.cs @@ -708,7 +708,8 @@ namespace MatterHackers.MatterControl public View3DWidget ActiveView3DWidget { get; internal set; } public string PrintingItemName { get; set; } - public string ProductName { get { return "MatterHackers: XForge"; } } + + public string ProductName => "MatterHackers: XForge"; public string CachePath(ILibraryItem libraryItem) { diff --git a/ApplicationView/WidescreenPanel.cs b/ApplicationView/WidescreenPanel.cs index 9c428cfa1..1ba0c4d8b 100644 --- a/ApplicationView/WidescreenPanel.cs +++ b/ApplicationView/WidescreenPanel.cs @@ -70,7 +70,7 @@ namespace MatterHackers.MatterControl leftNav.AddChild(new BrandMenuButton() { - MinimumSize = new VectorMath.Vector2(0, 32), + MinimumSize = new VectorMath.Vector2(0, 34), HAnchor = HAnchor.Stretch, VAnchor = VAnchor.Fit }); @@ -100,7 +100,7 @@ namespace MatterHackers.MatterControl VAnchor = VAnchor.Fit, Margin = new BorderDouble(6, 0) }; - + var icon = AggContext.StaticData.LoadImage(Path.Combine("Images", "mh-app-logo.png")); if (ActiveTheme.Instance.IsDarkTheme) { diff --git a/PartPreviewWindow/View3D/SlicePopupMenu.cs b/PartPreviewWindow/View3D/SlicePopupMenu.cs index 82ecca32d..208ee4db7 100644 --- a/PartPreviewWindow/View3D/SlicePopupMenu.cs +++ b/PartPreviewWindow/View3D/SlicePopupMenu.cs @@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow protected GuiWidget GetPopupContent() { - var widget = new IgnoredPopupWidget() + var popupContainer = new IgnoredPopupWidget() { HAnchor = HAnchor.Fit, VAnchor = VAnchor.Fit, @@ -117,14 +117,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow MinimumSize = new VectorMath.Vector2(400, 500) }; - widget.AddChild(progressContainer); + popupContainer.AddChild(progressContainer); var sliceButton = buttonFactory.Generate("Slice".Localize().ToUpper()); - widget.AddChild(sliceButton); + popupContainer.AddChild(sliceButton); sliceButton.ToolTipText = "Slice Parts".Localize(); sliceButton.Name = "Generate Gcode Button"; - //sliceButton.Margin = defaultMargin; sliceButton.Click += async (s, e) => { if (printer.Settings.PrinterSelected) @@ -142,14 +141,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow sliceProgressReporter.StartReporting(); // Save any pending changes before starting the print - await ApplicationController.Instance.ActiveView3DWidget.PersistPlateIfNeeded(); + await printerTabPage.modelViewer.PersistPlateIfNeeded(); await SlicingQueue.SliceFileAsync(printItem, sliceProgressReporter); sliceProgressReporter.EndReporting(); var gcodeLoadCancellationTokenSource = new CancellationTokenSource(); - ApplicationController.Instance.ActivePrinter.Bed.LoadGCode(printItem.GetGCodePathAndFileName(), gcodeLoadCancellationTokenSource.Token, printerTabPage.modelViewer.gcodeViewer.LoadProgress_Changed); + this.printer.Bed.LoadGCode(printItem.GetGCodePathAndFileName(), gcodeLoadCancellationTokenSource.Token, printerTabPage.modelViewer.gcodeViewer.LoadProgress_Changed); printerTabPage.ViewMode = PartViewMode.Layers3D; @@ -173,7 +172,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } }; - return widget; + return popupContainer; } }