Move common control size into base
This commit is contained in:
parent
56609532c9
commit
83e0dee7a9
3 changed files with 2 additions and 4 deletions
|
|
@ -35,8 +35,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
protected MHNumberEdit numberEdit;
|
||||
|
||||
public static readonly int ControlWidth = (int)(60 * GuiWidget.DeviceScale + .5);
|
||||
|
||||
protected bool AllowNegatives { get; set; } = true;
|
||||
protected bool AllowDecimals { get; set; } = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
protected MHTextEditWidget textEditWidget;
|
||||
|
||||
private readonly int ControlWidth = (int)(60 * GuiWidget.DeviceScale + .5);
|
||||
|
||||
public override void Initialize(int tabIndex)
|
||||
{
|
||||
textEditWidget = new MHTextEditWidget("", pixelWidth: ControlWidth, tabIndex: tabIndex)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
public event EventHandler<FieldChangedEventArgs> ValueChanged;
|
||||
|
||||
protected readonly int ControlWidth = (int)(60 * GuiWidget.DeviceScale + .5);
|
||||
|
||||
public void SetValue(string newValue, bool userInitiated)
|
||||
{
|
||||
string convertedValue = this.ConvertValue(newValue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue