diff --git a/ApplicationView/ApplicationController.cs b/ApplicationView/ApplicationController.cs index c57a1e0ee..774326d02 100644 --- a/ApplicationView/ApplicationController.cs +++ b/ApplicationView/ApplicationController.cs @@ -2163,7 +2163,12 @@ namespace MatterHackers.MatterControl systemWindow.AddChild(overlay); - var spinner = new LogoSpinner(overlay, rotateX: -0.05); + var mutedAccentColor = new Color(theme.Colors.PrimaryAccentColor, 185).OverlayOn(Color.White).ToColor(); + + var spinner = new LogoSpinner(overlay, rotateX: -0.05) + { + MeshColor = mutedAccentColor + }; progressPanel = new FlowLayoutWidget(FlowDirection.TopToBottom) { @@ -2184,7 +2189,7 @@ namespace MatterHackers.MatterControl progressPanel.AddChild(progressBar = new ProgressBar() { - FillColor = theme.Colors.PrimaryAccentColor, + FillColor = mutedAccentColor, BorderColor = theme.GetBorderColor(75), Height = 11, Width = 230, diff --git a/CustomWidgets/ExportPrintItemPage.cs b/CustomWidgets/ExportPrintItemPage.cs index dc5495f07..0ed42de9e 100644 --- a/CustomWidgets/ExportPrintItemPage.cs +++ b/CustomWidgets/ExportPrintItemPage.cs @@ -79,7 +79,7 @@ namespace MatterHackers.MatterControl } // Create export button for each plugin - var pluginButton = new RadioButton(new RadioImageWidget(plugin.ButtonText, plugin.Icon)) + var pluginButton = new RadioButton(new RadioImageWidget(plugin.ButtonText, theme.Colors.PrimaryTextColor, plugin.Icon)) { HAnchor = HAnchor.Left, Margin = commonMargin, diff --git a/CustomWidgets/RadioImageWidget.cs b/CustomWidgets/RadioImageWidget.cs index d83486430..9a697029b 100644 --- a/CustomWidgets/RadioImageWidget.cs +++ b/CustomWidgets/RadioImageWidget.cs @@ -35,8 +35,8 @@ namespace MatterHackers.MatterControl { public class RadioImageWidget : RadioButtonViewText { - public RadioImageWidget(string label, ImageBuffer image) - : base(label) + public RadioImageWidget(string label, Color textColor, ImageBuffer image) + : base(label, textColor) { var imageWidget = new ImageWidget(image); this.AddChild(imageWidget, this.Children.IndexOf(labelTextWidget)); diff --git a/CustomWidgets/RadioPanelWidget.cs b/CustomWidgets/RadioPanelWidget.cs index 48647655d..2e3ee40e7 100644 --- a/CustomWidgets/RadioPanelWidget.cs +++ b/CustomWidgets/RadioPanelWidget.cs @@ -35,8 +35,8 @@ namespace MatterHackers.MatterControl { public class RadioPanelWidget : RadioButtonViewText { - public RadioPanelWidget(string label, string info, ImageBuffer image) - : base(label) + public RadioPanelWidget(string label, Color textColor, string info, ImageBuffer image) + : base(label, textColor) { radioCircle.Margin = new BorderDouble(4); radioCircle.VAnchor = VAnchor.Top; diff --git a/PartPreviewWindow/PlusTab/ExplorerBar.cs b/PartPreviewWindow/PlusTab/ExplorerBar.cs index 587083569..ffbdd5e05 100644 --- a/PartPreviewWindow/PlusTab/ExplorerBar.cs +++ b/PartPreviewWindow/PlusTab/ExplorerBar.cs @@ -191,14 +191,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab { if(ProfileManager.Instance.Profiles.Count > 0) { - toolbar.AddChild(new TextWidget("Select a printer to continue".Localize() + "...", pointSize: theme.DefaultFontSize) + toolbar.AddChild(new TextWidget("Select a printer to continue".Localize() + "...", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize) { Margin = 15 }); } else { - toolbar.AddChild(new TextWidget("Create a printer to continue".Localize() + "...", pointSize: theme.DefaultFontSize) + toolbar.AddChild(new TextWidget("Create a printer to continue".Localize() + "...", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize) { Margin = 15 }); diff --git a/PrinterControls/PrinterConnections/BaseConnectionWidget.cs b/PrinterControls/PrinterConnections/BaseConnectionWidget.cs index 1d3795779..d6554e61a 100644 --- a/PrinterControls/PrinterConnections/BaseConnectionWidget.cs +++ b/PrinterControls/PrinterConnections/BaseConnectionWidget.cs @@ -22,18 +22,6 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections : base(label) { PortValue = value; - this.EnabledChanged += new EventHandler(onRadioButtonEnabledChanged); - } - - private void onRadioButtonEnabledChanged(object sender, EventArgs e) - { - if (this.Enabled) - { - this.TextColor = Color.White; - } - { - this.TextColor = Color.Gray; - } } } diff --git a/PrinterControls/PrinterConnections/SetupStepComPortManual.cs b/PrinterControls/PrinterConnections/SetupStepComPortManual.cs index fd06f08bb..169b99189 100644 --- a/PrinterControls/PrinterConnections/SetupStepComPortManual.cs +++ b/PrinterControls/PrinterConnections/SetupStepComPortManual.cs @@ -118,39 +118,47 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections private FlowLayoutWidget createComPortContainer() { - FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom); - container.Margin = new BorderDouble(0); - container.VAnchor = VAnchor.Stretch; + var container = new FlowLayoutWidget(FlowDirection.TopToBottom) + { + Margin = new BorderDouble(0), + VAnchor = VAnchor.Stretch + }; + BorderDouble elementMargin = new BorderDouble(top: 3); - string serialPortLabel = "Serial Port".Localize(); - string serialPortLabelFull = string.Format("{0}:", serialPortLabel); + var comPortLabel = new TextWidget("Serial Port".Localize() + ":", 0, 0, 12) + { + TextColor = ActiveTheme.Instance.PrimaryTextColor, + Margin = new BorderDouble(0, 0, 0, 10), + HAnchor = HAnchor.Stretch + }; - TextWidget comPortLabel = new TextWidget(serialPortLabelFull, 0, 0, 12); - comPortLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor; - comPortLabel.Margin = new BorderDouble(0, 0, 0, 10); - comPortLabel.HAnchor = HAnchor.Stretch; - - FlowLayoutWidget serialPortContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); + var serialPortContainer = new FlowLayoutWidget(FlowDirection.TopToBottom); CreateSerialPortControls(serialPortContainer, null); - FlowLayoutWidget comPortMessageContainer = new FlowLayoutWidget(); - comPortMessageContainer.Margin = elementMargin; - comPortMessageContainer.HAnchor = HAnchor.Stretch; + var comPortMessageContainer = new FlowLayoutWidget + { + Margin = elementMargin, + HAnchor = HAnchor.Stretch + }; - printerComPortError = new TextWidget("Currently available serial ports.".Localize(), 0, 0, 10); - printerComPortError.TextColor = ActiveTheme.Instance.PrimaryTextColor; - printerComPortError.AutoExpandBoundsToText = true; + printerComPortError = new TextWidget("Currently available serial ports.".Localize(), 0, 0, 10) + { + TextColor = ActiveTheme.Instance.PrimaryTextColor, + AutoExpandBoundsToText = true + }; printerComPortHelpLink = linkButtonFactory.Generate("What's this?".Localize()); printerComPortHelpLink.Margin = new BorderDouble(left: 5); printerComPortHelpLink.VAnchor = VAnchor.Bottom; printerComPortHelpLink.Click += (s, e) => printerComPortHelpMessage.Visible = !printerComPortHelpMessage.Visible; - printerComPortHelpMessage = new TextWidget("The 'Serial Port' section lists all available serial\nports on your device. Changing which USB port the printer\nis connected to may change the associated serial port.\n\nTip: If you are uncertain, unplug/plug in your printer\nand hit refresh. The new port that appears should be\nyour printer.".Localize(), 0, 0, 10); - printerComPortHelpMessage.TextColor = ActiveTheme.Instance.PrimaryTextColor; - printerComPortHelpMessage.Margin = new BorderDouble(top: 10); - printerComPortHelpMessage.Visible = false; + printerComPortHelpMessage = new TextWidget("The 'Serial Port' section lists all available serial\nports on your device. Changing which USB port the printer\nis connected to may change the associated serial port.\n\nTip: If you are uncertain, unplug/plug in your printer\nand hit refresh. The new port that appears should be\nyour printer.".Localize(), 0, 0, 10) + { + TextColor = ActiveTheme.Instance.PrimaryTextColor, + Margin = new BorderDouble(top: 10), + Visible = false + }; comPortMessageContainer.AddChild(printerComPortError); comPortMessageContainer.AddChild(printerComPortHelpLink); @@ -189,10 +197,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections protected void CreateSerialPortControls(FlowLayoutWidget comPortContainer, string activePrinterSerialPort) { int portIndex = 0; - string[] portsToCreate = FrostedSerialPort.GetPortNames(); // Add a radio button for each filtered port - foreach (string portName in portsToCreate) + foreach (string portName in FrostedSerialPort.GetPortNames()) { SerialPortIndexRadioButton comPortOption = createComPortOption(portName, activePrinterSerialPort == portName); if (comPortOption.Checked) @@ -220,23 +227,24 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections //If there are still no com ports show a message to that effect if (portIndex == 0) { - TextWidget comPortOption = new TextWidget("No COM ports available".Localize()); - comPortOption.Margin = new BorderDouble(3, 6, 5, 6); - comPortOption.TextColor = ActiveTheme.Instance.PrimaryTextColor; + var comPortOption = new TextWidget("No COM ports available".Localize()) + { + Margin = new BorderDouble(3, 6, 5, 6), + TextColor = ActiveTheme.Instance.PrimaryTextColor + }; comPortContainer.AddChild(comPortOption); } } private SerialPortIndexRadioButton createComPortOption(string portName, bool isActivePrinterPort) { - SerialPortIndexRadioButton comPortOption = new SerialPortIndexRadioButton(portName, portName) + return new SerialPortIndexRadioButton(portName, portName) { HAnchor = HAnchor.Left, Margin = new BorderDouble(3, 3, 5, 3), TextColor = ActiveTheme.Instance.PrimaryTextColor, Checked = isActivePrinterPort }; - return comPortOption; } private string GetSelectedSerialPort() diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 2faecb966..840a2cdaf 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 2faecb96628ac12b327deb81805cc5fb2c9e9994 +Subproject commit 840a2cdaff743545260ea28e8b6541d3f8f75f5c