Make Password fields theme aware

- Issue MatterHackers/MCCentral#4385
Password fields should be theme aware
This commit is contained in:
John Lewin 2018-10-29 14:03:13 -07:00
parent ceda78872b
commit 2ba333c764

View file

@ -69,8 +69,16 @@ namespace MatterHackers.MatterControl
Selectable = false,
HAnchor = HAnchor.Stretch,
VAnchor = VAnchor.Bottom,
TextColor = theme.EditFieldColors.Inactive.TextColor
};
passwordCoverText.MinimumSize = new Vector2(Math.Max(passwordCoverText.MinimumSize.X, pixelWidth), Math.Max(passwordCoverText.MinimumSize.Y, pixelHeight));
var internalWidget = this.ActualTextEditWidget.InternalTextEditWidget;
internalWidget.FocusChanged += (s, e) =>
{
passwordCoverText.TextColor = (internalWidget.Focused) ? theme.EditFieldColors.Focused.TextColor : theme.EditFieldColors.Inactive.TextColor;
};
this.AddChild(passwordCoverText);
this.ActualTextEditWidget.TextChanged += (sender, e) =>