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:
parent
817fe3e105
commit
1c0138d7c1
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue