Use Border override
This commit is contained in:
parent
4f0f790f56
commit
fd793e076a
1 changed files with 25 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue