Set the toggle switch text color.

This commit is contained in:
Lars Brubaker 2015-05-26 11:59:56 -07:00
parent 262d7f0cd2
commit 770c783a13
2 changed files with 5 additions and 23 deletions

@ -1 +1 @@
Subproject commit 42072a2fe1dc12c2e7522a6ddb099340734bf849
Subproject commit 859f4aa4b5e1b3ad8305f552329fbcfccb927c2a

View file

@ -27,14 +27,10 @@ of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Reflection;
using MatterHackers.Agg.UI;
using MatterHackers.Agg;
using MatterHackers.Agg.Image;
using MatterHackers.Agg.UI;
using NUnit.Framework;
namespace MatterHackers.MatterControl.UI
{
@ -57,11 +53,11 @@ namespace MatterHackers.MatterControl.UI
FlowLayoutWidget topToBottomContainer = new FlowLayoutWidget(FlowDirection.TopToBottom)
{
HAnchor = HAnchor.ParentLeftRight,
VAnchor = VAnchor.ParentBottomTop,
VAnchor = VAnchor.ParentBottomTop,
};
outerContainer.AddChild(topToBottomContainer);
CheckBox toggleBox = CreateCheckboxFromToggleSwitchView();
CheckBox toggleBox = ImageButtonFactory.CreateToggleSwitch(true);
toggleBox.HAnchor = HAnchor.ParentLeftRight;
toggleBox.VAnchor = VAnchor.ParentBottomTop;
toggleBox.Margin = new BorderDouble(marginSize);
@ -86,20 +82,6 @@ namespace MatterHackers.MatterControl.UI
Assert.IsTrue(bounds.Bottom == marginSize, "Bottom margin is incorrect");
}
private static CheckBox CreateCheckboxFromToggleSwitchView()
{
ToggleSwitchView toggleView = new ToggleSwitchView("On", "Off",
60, 24,
ActiveTheme.Instance.PrimaryBackgroundColor,
new RGBA_Bytes(220, 220, 220),
ActiveTheme.Instance.PrimaryAccentColor,
ActiveTheme.Instance.PrimaryTextColor);
CheckBox toggleBox = new CheckBox(toggleView);
toggleBox.Checked = true;
return toggleBox;
}
private void OutputImage(ImageBuffer imageToOutput, string fileName)
{
if (saveImagesForDebug)