diff --git a/MatterControlLib/ControlElements/MHNumberEdit.cs b/MatterControlLib/ControlElements/MHNumberEdit.cs index 25d88f8e0..0b7b70b68 100644 --- a/MatterControlLib/ControlElements/MHNumberEdit.cs +++ b/MatterControlLib/ControlElements/MHNumberEdit.cs @@ -1,5 +1,5 @@ /* -Copyright (c) 2017, Lars Brubaker, John Lewin +Copyright (c) 2018, Lars Brubaker, John Lewin All rights reserved. Redistribution and use in source and binary forms, with or without @@ -91,6 +91,30 @@ namespace MatterHackers.MatterControl set => base.BackgroundColor = value; } + public override Color BorderColor + { + get + { + if (base.BorderColor != Color.Transparent) + { + return base.BackgroundColor; + } + else if (this.ContainsFocus) + { + return theme.EditFieldColors.Focused.BorderColor; + } + else if (this.mouseInBounds) + { + return theme.EditFieldColors.Hovered.BorderColor; + } + else + { + return theme.EditFieldColors.Inactive.BorderColor; + } + } + set => base.BorderColor = value; + } + private bool mouseInBounds = false; public override void OnMouseEnterBounds(MouseEventArgs mouseEvent)