SimpleButton should allow caller to specify text color

- Issue MatterHackers/MCCentral#2514
Adjust print popup menu for forced white background
This commit is contained in:
John Lewin 2017-12-29 09:07:34 -08:00
parent 817fe3e105
commit 1c0138d7c1

View file

@ -231,6 +231,11 @@ namespace MatterHackers.MatterControl.CustomWidgets
private TextWidget textWidget;
public TextButton(string text, ThemeConfig theme)
: this(text, theme, theme.ButtonFactory.Options.NormalTextColor)
{
}
public TextButton(string text, ThemeConfig theme, Color textColor)
: base(theme)
{
this.HAnchor = HAnchor.Fit;
@ -238,7 +243,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
this.Height = theme.ButtonFactory.Options.FixedHeight;
this.Padding = theme.ButtonFactory.Options.Margin;
this.AddChild(textWidget = new TextWidget(text, pointSize: theme.ButtonFactory.Options.FontSize, textColor: theme.ButtonFactory.Options.NormalTextColor)
this.AddChild(textWidget = new TextWidget(text, pointSize: theme.ButtonFactory.Options.FontSize, textColor: textColor)
{
HAnchor = HAnchor.Center,
VAnchor = VAnchor.Center