From 770c783a13ccc34fb320fd9fbf32fc61caf5d412 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Tue, 26 May 2015 11:59:56 -0700 Subject: [PATCH] Set the toggle switch text color. --- Submodules/agg-sharp | 2 +- .../MatterControl/MatterControl.UI.cs | 26 +++---------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 42072a2fe..859f4aa4b 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 42072a2fe1dc12c2e7522a6ddb099340734bf849 +Subproject commit 859f4aa4b5e1b3ad8305f552329fbcfccb927c2a diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControl.UI.cs b/Tests/MatterControl.Tests/MatterControl/MatterControl.UI.cs index 37c0ae559..0ae0ce690 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControl.UI.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControl.UI.cs @@ -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)