Skip to content

Commit

Permalink
Improve the color picker hint.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladiStep committed May 4, 2023
1 parent 8a21b56 commit f071454
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UndertaleModTool/Controls/ColorPicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public ColorPicker()
ColorText.SetBinding(TextBox.TextProperty, binding);

ColorText.MaxLength = HasAlpha ? 9 : 7;
ColorText.ToolTip = $"{(HasAlpha ? "A, " : "")}B, G, R";
ColorText.ToolTip = $"#{(HasAlpha ? "AA" : "")}BBGGRR";
ToolTipService.SetInitialShowDelay(ColorText, 250);
}

private static void OnHasAlphaChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
Expand All @@ -77,7 +78,7 @@ private static void OnHasAlphaChanged(DependencyObject dependencyObject, Depende
colorPicker.ColorText.SetBinding(TextBox.TextProperty, binding);

colorPicker.ColorText.MaxLength = hasAlpha ? 9 : 7;
colorPicker.ColorText.ToolTip = $"{(hasAlpha ? "A, " : "")}B, G, R";
colorPicker.ColorText.ToolTip = $"#{(hasAlpha ? "AA" : "")}BBGGRR";
}
}

Expand Down

0 comments on commit f071454

Please sign in to comment.