Use theme colors

- Issue MatterHackers/MCCentral#3893
New controls should use theme colors
This commit is contained in:
John Lewin 2018-07-18 19:17:11 -07:00
parent cf81677177
commit 01021a9dbb
2 changed files with 8 additions and 2 deletions

View file

@ -764,7 +764,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
break;
case SliceSettingData.DataEditTypes.READONLY_STRING:
uiField = new ReadOnlyTextField();
uiField = new ReadOnlyTextField(theme);
break;
case SliceSettingData.DataEditTypes.STRING:

View file

@ -70,10 +70,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public class ReadOnlyTextField : UIField
{
TextWidget textWidget;
private ThemeConfig theme;
public ReadOnlyTextField(ThemeConfig theme)
{
this.theme = theme;
}
public override void Initialize(int tabIndex)
{
textWidget = new TextWidget("")
textWidget = new TextWidget("", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
{
TabIndex = tabIndex,
ToolTipText = this.HelpText,