Make Password fields theme aware
- Issue MatterHackers/MCCentral#4385 Password fields should be theme aware
This commit is contained in:
parent
ceda78872b
commit
2ba333c764
1 changed files with 8 additions and 0 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue