From 06e957d7b9e3fbac7bbebeeaae6d2b92c389dd71 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 8 Nov 2017 23:24:10 -0800 Subject: [PATCH] Rename ValueDisplayInfo -> InlineEditControl - Issue MatterHackers/MCCentral#2201 Consider renaming ValueDisplayInfo to better describe behavior --- .../{ValueDisplayInfo.cs => InlineEditControl.cs} | 7 +++---- MatterControl.csproj | 2 +- PartPreviewWindow/SliceLayerSelector.cs | 4 ++-- PartPreviewWindow/View3D/Gui3D/MoveInZControl.cs | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) rename CustomWidgets/{ValueDisplayInfo.cs => InlineEditControl.cs} (95%) diff --git a/CustomWidgets/ValueDisplayInfo.cs b/CustomWidgets/InlineEditControl.cs similarity index 95% rename from CustomWidgets/ValueDisplayInfo.cs rename to CustomWidgets/InlineEditControl.cs index 40d109dd1..15d75b950 100644 --- a/CustomWidgets/ValueDisplayInfo.cs +++ b/CustomWidgets/InlineEditControl.cs @@ -1,5 +1,5 @@ /* -Copyright (c) 2014, Lars Brubaker +Copyright (c) 2017, Lars Brubaker, John Lewin All rights reserved. Redistribution and use in source and binary forms, with or without @@ -31,16 +31,15 @@ using System; using System.Diagnostics; using MatterHackers.Agg; using MatterHackers.Agg.UI; -using MatterHackers.MeshVisualizer; namespace MatterHackers.MatterControl.CustomWidgets { - public class ValueDisplayInfo : GuiWidget + public class InlineEditControl : GuiWidget { private TextWidget numberDisplay; private NumberEdit numberEdit; - public ValueDisplayInfo(string defaultSizeString = "-0000.00", Agg.Font.Justification justification = Agg.Font.Justification.Left) + public InlineEditControl(string defaultSizeString = "-0000.00", Agg.Font.Justification justification = Agg.Font.Justification.Left) { double pointSize = 12; numberDisplay = new TextWidget(defaultSizeString, 0, 0, pointSize, justification: justification) diff --git a/MatterControl.csproj b/MatterControl.csproj index fd2782bb0..deacda461 100644 --- a/MatterControl.csproj +++ b/MatterControl.csproj @@ -93,6 +93,7 @@ + @@ -104,7 +105,6 @@ - diff --git a/PartPreviewWindow/SliceLayerSelector.cs b/PartPreviewWindow/SliceLayerSelector.cs index 0bce9eea3..c18e7ba72 100644 --- a/PartPreviewWindow/SliceLayerSelector.cs +++ b/PartPreviewWindow/SliceLayerSelector.cs @@ -39,7 +39,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { public static int SliderWidth { get; } = (UserSettings.Instance.IsTouchScreen) ? 20 : 10; - private ValueDisplayInfo currentLayerInfo; + private InlineEditControl currentLayerInfo; private LayerScrollbar layerScrollbar; private BedConfig sceneContext; @@ -58,7 +58,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerSlider = layerScrollbar.layerSlider; - currentLayerInfo = new ValueDisplayInfo("1000") + currentLayerInfo = new InlineEditControl("1000") { GetDisplayString = (value) => $"{value + 1}", HAnchor = HAnchor.Absolute, diff --git a/PartPreviewWindow/View3D/Gui3D/MoveInZControl.cs b/PartPreviewWindow/View3D/Gui3D/MoveInZControl.cs index be5d4d457..fb1279b5f 100644 --- a/PartPreviewWindow/View3D/Gui3D/MoveInZControl.cs +++ b/PartPreviewWindow/View3D/Gui3D/MoveInZControl.cs @@ -57,14 +57,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private double lineLength = 55; private List lines = new List(); private double upArrowSize = 7 * GuiWidget.DeviceScale; - private ValueDisplayInfo zHeightDisplayInfo; + private InlineEditControl zHeightDisplayInfo; private bool HadClickOnControl; public MoveInZControl(IInteractionVolumeContext context) : base(context) { Name = "MoveInZControl"; - zHeightDisplayInfo = new ValueDisplayInfo() + zHeightDisplayInfo = new InlineEditControl() { ForceHide = () => {