diff --git a/ActionBar/ActionBarBaseControls.cs b/ActionBar/ActionBarBaseControls.cs index 729affddc..e0cb13346 100644 --- a/ActionBar/ActionBarBaseControls.cs +++ b/ActionBar/ActionBarBaseControls.cs @@ -194,7 +194,7 @@ namespace MatterHackers.MatterControl.ActionBar } else { - string statusStringBeg = LocalizedString.Get("Status"); + string statusStringBeg = LocalizedString.Get("STATUS"); string statusString = string.Format("{1}: {0}", PrinterCommunication.Instance.PrinterConnectionStatusVerbose, statusStringBeg); printerStatusText.Text = string.Format(statusString,PrinterCommunication.Instance.PrinterConnectionStatusVerbose); } diff --git a/ActionBar/PrinterActionRow.cs b/ActionBar/PrinterActionRow.cs index f84d7145c..4b13d4b20 100644 --- a/ActionBar/PrinterActionRow.cs +++ b/ActionBar/PrinterActionRow.cs @@ -30,11 +30,11 @@ namespace MatterHackers.MatterControl.ActionBar protected override void Initialize() { - actionBarButtonFactory.normalTextColor = RGBA_Bytes.White; - actionBarButtonFactory.hoverTextColor = RGBA_Bytes.White; - actionBarButtonFactory.pressedTextColor = RGBA_Bytes.White; + actionBarButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + actionBarButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + actionBarButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; - actionBarButtonFactory.disabledTextColor = RGBA_Bytes.LightGray; + actionBarButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected; actionBarButtonFactory.disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor; actionBarButtonFactory.disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor; @@ -46,15 +46,15 @@ namespace MatterHackers.MatterControl.ActionBar protected override void AddChildElements() { actionBarButtonFactory.invertImageLocation = false; - string connectString = LocalizedString.Get("Connect"); + string connectString = LocalizedString.Get("CONNECT"); connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png"); - connectPrinterButton.Margin = new BorderDouble(3, 0); + connectPrinterButton.Margin = new BorderDouble(0, 0, 3); connectPrinterButton.VAnchor = VAnchor.ParentCenter; connectPrinterButton.Cursor = Cursors.Hand; - string disconnectString = LocalizedString.Get("Disconnect"); + string disconnectString = LocalizedString.Get("DISCONNECT"); disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png"); - disconnectPrinterButton.Margin = new BorderDouble(3, 0); + disconnectPrinterButton.Margin = new BorderDouble(0, 0, 3); disconnectPrinterButton.VAnchor = VAnchor.ParentCenter; disconnectPrinterButton.Visible = false; disconnectPrinterButton.Cursor = Cursors.Hand; @@ -62,13 +62,15 @@ namespace MatterHackers.MatterControl.ActionBar selectActivePrinterButton = new PrinterSelectButton(); selectActivePrinterButton.HAnchor = HAnchor.ParentLeftRight; selectActivePrinterButton.Cursor = Cursors.Hand; + selectActivePrinterButton.Margin = new BorderDouble(0, 6); + actionBarButtonFactory.invertImageLocation = true; this.AddChild(connectPrinterButton); this.AddChild(disconnectPrinterButton); this.AddChild(selectActivePrinterButton); - this.AddChild(CreateOptionsMenu()); + //this.AddChild(CreateOptionsMenu()); } GuiWidget CreateOptionsMenu() @@ -79,8 +81,8 @@ namespace MatterHackers.MatterControl.ActionBar FlowLayoutWidget leftToRight = new FlowLayoutWidget(); leftToRight.Margin = new BorderDouble(5, 0); - string optionsString = LocalizedString.Get("Options"); - TextWidget optionsText = new TextWidget(optionsString, textColor: RGBA_Bytes.White); + string optionsString = LocalizedString.Get("OPTIONS"); + TextWidget optionsText = new TextWidget(optionsString, textColor: ActiveTheme.Instance.PrimaryTextColor); optionsText.VAnchor = Agg.UI.VAnchor.ParentCenter; optionsText.Margin = new BorderDouble(0, 0, 3, 0); leftToRight.AddChild(optionsText); diff --git a/ApplicationView/MainApplicationWidget.cs b/ApplicationView/MainApplicationWidget.cs index 3234d3b38..05452b34c 100644 --- a/ApplicationView/MainApplicationWidget.cs +++ b/ApplicationView/MainApplicationWidget.cs @@ -56,6 +56,7 @@ namespace MatterHackers.MatterControl public RootedObjectEventHandler ReloadPanelTrigger = new RootedObjectEventHandler(); public RootedObjectEventHandler SetUpdateNotificationTrigger = new RootedObjectEventHandler(); bool widescreenMode; + event EventHandler unregisterEvents; public bool WidescreenMode { @@ -73,9 +74,11 @@ namespace MatterHackers.MatterControl } } + public ApplicationWidget() { Name = "MainSlidePanel"; + ActiveTheme.Instance.ThemeChanged.RegisterEvent(ReloadAll, ref unregisterEvents); } public void AddElements() @@ -86,6 +89,15 @@ namespace MatterHackers.MatterControl SetUpdateNotification(this, null); } + public void ReloadAll(object sender, EventArgs e) + { + UiThread.RunOnIdle((state) => + { + this.RemoveAllChildren(); + this.AddChild(new WidescreenPanel()); + }); + } + public static ApplicationWidget Instance { get diff --git a/ApplicationView/WidescreenPanel.cs b/ApplicationView/WidescreenPanel.cs index 2dafcdafb..9efdb4f41 100644 --- a/ApplicationView/WidescreenPanel.cs +++ b/ApplicationView/WidescreenPanel.cs @@ -60,16 +60,12 @@ namespace MatterHackers.MatterControl RGBA_Bytes unselectedTextColor = ActiveTheme.Instance.TabLabelUnselected; SliceSettingsWidget.UiState sliceSettingsUiState; - FlowLayoutWidget ColumnZero; FlowLayoutWidget ColumnOne; FlowLayoutWidget ColumnTwo; int ColumnTwoMinWidth = 1390; FlowLayoutWidget ColumnThree; int ColumnThreeMinWidth = 990; - ActionBarPlus actionBarPlus; - QueueTab queueTab; - View3DTransformPart part3DView; GcodeViewBasic partGcodeView; @@ -203,18 +199,18 @@ namespace MatterHackers.MatterControl manualPrinterControlsScrollArea.AddChild(manualPrinterControls); //Add the tab contents for 'Advanced Controls' - string printerControlsLabel = LocalizedString.Get("Controls"); - advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), 18, + string printerControlsLabel = LocalizedString.Get("CONTROLS"); + advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), 16, ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); - string sliceSettingsLabel = LocalizedString.Get("Slice Settings"); + string sliceSettingsLabel = LocalizedString.Get("SLICE SETTINGS"); sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState); - advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(sliceSettingsWidget, sliceSettingsLabel), 18, + advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(sliceSettingsWidget, sliceSettingsLabel), 16, ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); - string configurationLabel = LocalizedString.Get("Configuration"); + string configurationLabel = LocalizedString.Get("CONFIGURATION"); ScrollableWidget configurationControls = new ConfigurationPage(); - advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(configurationControls, configurationLabel), 18, + advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(configurationControls, configurationLabel), 16, ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); return advancedControls; @@ -423,17 +419,17 @@ namespace MatterHackers.MatterControl this.Margin = new BorderDouble(top: 4); - QueueTabPage = new TabPage(new QueueControlsWidget(), "Queue"); - this.AddTab(new SimpleTextTabWidget(QueueTabPage, 18, - ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); + QueueTabPage = new TabPage(new QueueControlsWidget(), "QUEUE"); + this.AddTab(new SimpleTextTabWidget(QueueTabPage, 16, + ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); - LibraryTabPage = new TabPage(new PrintLibraryWidget(), "Library"); - this.AddTab(new SimpleTextTabWidget(LibraryTabPage, 18, - ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); + LibraryTabPage = new TabPage(new PrintLibraryWidget(), "LIBRARY"); + this.AddTab(new SimpleTextTabWidget(LibraryTabPage, 16, + ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); - AboutTabPage = new TabPage(new AboutPage(), "About"); - AboutTabView = new SimpleTextTabWidget(AboutTabPage, 18, - ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()); + AboutTabPage = new TabPage(new AboutPage(), "ABOUT"); + AboutTabView = new SimpleTextTabWidget(AboutTabPage, 16, + ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()); this.AddTab(AboutTabView); NumQueueItemsChanged(this, null); @@ -443,7 +439,7 @@ namespace MatterHackers.MatterControl void NumQueueItemsChanged(object sender, EventArgs widgetEvent) { - string queueStringBeg = LocalizedString.Get("Queue"); + string queueStringBeg = LocalizedString.Get("QUEUE"); string queueString = string.Format("{1} ({0})", PrintQueue.PrintQueueControl.Instance.Count, queueStringBeg); QueueTabPage.Text = string.Format(queueString, PrintQueue.PrintQueueControl.Instance.Count); } @@ -466,7 +462,7 @@ namespace MatterHackers.MatterControl { UpdateControl.NeedToCheckForUpdateFirstTimeEver = false; addedUpdateMark = new NotificationWidget(); - addedUpdateMark.OriginRelativeParent = new Vector2(63, 10); + addedUpdateMark.OriginRelativeParent = new Vector2(72, 10); AboutTabView.AddChild(addedUpdateMark); } #else @@ -479,7 +475,7 @@ namespace MatterHackers.MatterControl { addedUpdateMark.Visible = false; } - AboutTabPage.Text = string.Format("About"); + AboutTabPage.Text = string.Format("ABOUT"); } } diff --git a/ControlElements/TextImageButtonFactory.cs b/ControlElements/TextImageButtonFactory.cs index 257755bc8..6b60af5e6 100644 --- a/ControlElements/TextImageButtonFactory.cs +++ b/ControlElements/TextImageButtonFactory.cs @@ -42,6 +42,7 @@ using MatterHackers.RenderOpenGl; using MatterHackers.VectorMath; using MatterHackers.Agg.VertexSource; using MatterHackers.MatterControl.DataStorage; +using MatterHackers.Agg.ImageProcessing; namespace MatterHackers.MatterControl { @@ -76,8 +77,13 @@ namespace MatterHackers.MatterControl container.AddChild(leftSpace); } - if (image != null) + if (image != null && image.Width > 0) { + if (!ActiveTheme.Instance.IsDarkTheme) + { + InvertLightness.DoInvertLightness(image); + } + imageWidget = new ImageWidget(image); imageWidget.VAnchor = VAnchor.ParentCenter; container.AddChild(imageWidget); @@ -187,6 +193,11 @@ namespace MatterHackers.MatterControl string path = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, imageName); ImageBuffer buffer = new ImageBuffer(10, 10, 32, new BlenderBGRA()); ImageIO.LoadImageData(path, buffer); + + if (!ActiveTheme.Instance.IsDarkTheme) + { + InvertLightness.DoInvertLightness(buffer); + } return buffer; } @@ -197,7 +208,7 @@ namespace MatterHackers.MatterControl editButton = new Button(0, 0, new ButtonViewThreeImage(LoadUpButtonImage("icon_edit_white.png"), LoadUpButtonImage("icon_edit_gray.png"), LoadUpButtonImage("icon_edit_Black.png"))); editButton.Margin = new BorderDouble(2, -2, 2, 0); editButton.VAnchor = Agg.UI.VAnchor.ParentTop; - TextWidget textLabel = new TextWidget(label, textColor: RGBA_Bytes.White); + TextWidget textLabel = new TextWidget(label, textColor: ActiveTheme.Instance.PrimaryTextColor); textLabel.VAnchor = Agg.UI.VAnchor.ParentTop; groupLableAndEditControl.AddChild(textLabel); groupLableAndEditControl.AddChild(editButton); @@ -329,6 +340,26 @@ namespace MatterHackers.MatterControl pressedText = label; } + if (normalToPressedImageName == null) + { + normalToPressedImageName = pressedImageName; + } + + if (pressedImageName == null) + { + pressedImageName = normalToPressedImageName; + } + + if (pressedToNormalImageName == null) + { + pressedToNormalImageName = normalImageName; + } + + if (normalImageName == "icon_arrow_right_no_border_32x32.png") + { + int a = 0; + } + if (normalImageName != null) { ImageIO.LoadImageData(this.GetImageLocation(normalImageName), normalImage); @@ -349,20 +380,7 @@ namespace MatterHackers.MatterControl ImageIO.LoadImageData(this.GetImageLocation(pressedToNormalImageName), pressedToNormalImage); } - if (normalToPressedImageName == null) - { - normalToPressedImage = pressedImage; - } - if (pressedImageName == null) - { - pressedImage = normalToPressedImage; - } - - if (pressedToNormalImageName == null) - { - pressedToNormalImage = normalImage; - } if (invertImageLocation) { @@ -394,6 +412,10 @@ namespace MatterHackers.MatterControl { iconImage = new ImageBuffer(); ImageIO.LoadImageData(this.GetImageLocation(iconImageName), iconImage); + if (!ActiveTheme.Instance.IsDarkTheme) + { + InvertLightness.DoInvertLightness(iconImage); + } } BorderDouble internalMargin = new BorderDouble(0); diff --git a/ControlElements/ThemeFactory.cs b/ControlElements/ThemeFactory.cs index b440b4e12..d8373f54c 100644 --- a/ControlElements/ThemeFactory.cs +++ b/ControlElements/ThemeFactory.cs @@ -40,6 +40,14 @@ namespace MatterHackers.MatterControl } } + public bool IsDarkTheme + { + get + { + return loadedTheme.DarkTheme; + } + } + public RGBA_Bytes TransparentDarkOverlay { get @@ -56,6 +64,7 @@ namespace MatterHackers.MatterControl } } + public RGBA_Bytes TabLabelSelected { get @@ -72,6 +81,13 @@ namespace MatterHackers.MatterControl } } + public RGBA_Bytes SecondaryTextColor + { + get + { + return loadedTheme.secondaryTextColor; + } + } public RGBA_Bytes PrimaryBackgroundColor { @@ -175,18 +191,36 @@ namespace MatterHackers.MatterControl { //Generate a list of available theme definitions List themeList = new List(); - themeList.Add(new Theme("Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190))); - themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204))); + themeList.Add(new Theme("Dark Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190))); + themeList.Add(new Theme("Blue", new RGBA_Bytes(0, 75, 139), new RGBA_Bytes(0, 103, 190), false)); - themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32))); - themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255))); - themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76))); + themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204))); + themeList.Add(new Theme("Teal", new RGBA_Bytes(0, 130, 153), new RGBA_Bytes(0, 173, 204), false)); + + themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32))); + themeList.Add(new Theme("Green", new RGBA_Bytes(0, 138, 23), new RGBA_Bytes(0, 189, 32), false)); + + themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255))); + themeList.Add(new Theme("Light Blue", new RGBA_Bytes(93, 178, 255), new RGBA_Bytes(144, 202, 255), false)); + + themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76))); + themeList.Add(new Theme("Orange", new RGBA_Bytes(255, 129, 25), new RGBA_Bytes(255, 157, 76), false)); + themeList.Add(new Theme("Purple", new RGBA_Bytes(70, 23, 180), new RGBA_Bytes(104, 51, 229))); - themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77))); - themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203))); - themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114))); - themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188,0,200))); + themeList.Add(new Theme("Purple", new RGBA_Bytes(70, 23, 180), new RGBA_Bytes(104, 51, 229), false)); + + themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77))); + themeList.Add(new Theme("Red", new RGBA_Bytes(172, 25, 61), new RGBA_Bytes(217, 31, 77), false)); + + themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203))); + themeList.Add(new Theme("Pink", new RGBA_Bytes(220, 79, 173), new RGBA_Bytes(233, 143, 203), false)); + + themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114))); + themeList.Add(new Theme("Grey", new RGBA_Bytes(88, 88, 88), new RGBA_Bytes(114, 114, 114), false)); + + themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188,0,200))); + themeList.Add(new Theme("Pink", new RGBA_Bytes(140, 0, 149), new RGBA_Bytes(188, 0, 200), false)); return themeList; } } @@ -202,9 +236,13 @@ namespace MatterHackers.MatterControl public RGBA_Bytes tabLabelSelectedColor; public RGBA_Bytes tabLabelUnselectedColor; public string name; + bool darkTheme; + + public bool DarkTheme { get { return darkTheme; } } public Theme(string name, RGBA_Bytes primary, RGBA_Bytes secondary, bool darkTheme = true) { + this.darkTheme = darkTheme; this.name = name; if (darkTheme) @@ -215,20 +253,22 @@ namespace MatterHackers.MatterControl this.primaryBackgroundColor = new RGBA_Bytes(68, 68, 68); this.secondaryBackgroundColor = new RGBA_Bytes(51, 51, 51); this.tabLabelSelectedColor = new RGBA_Bytes(255, 255, 255); - this.tabLabelUnselectedColor = new RGBA_Bytes(200, 200, 200); + this.tabLabelUnselectedColor = new RGBA_Bytes(180, 180, 180); this.primaryTextColor = new RGBA_Bytes(255, 255, 255); + this.secondaryTextColor = new RGBA_Bytes(40, 40, 40); } else { this.primaryAccentColor = secondary; this.secondaryAccentColor = primary; - - this.primaryBackgroundColor = new RGBA_Bytes(169, 169, 169); - this.secondaryBackgroundColor = new RGBA_Bytes(208, 208, 208); - this.tabLabelSelectedColor = new RGBA_Bytes(255, 255, 255); - this.tabLabelUnselectedColor = new RGBA_Bytes(200, 200, 200); - this.primaryTextColor = new RGBA_Bytes(255, 255, 255); + + this.primaryBackgroundColor = new RGBA_Bytes(208, 208, 208); + this.secondaryBackgroundColor = new RGBA_Bytes(185, 185, 185); + this.tabLabelSelectedColor = new RGBA_Bytes(51, 51, 51); + this.tabLabelUnselectedColor = new RGBA_Bytes(102, 102, 102); + this.primaryTextColor = new RGBA_Bytes(34, 34, 34); + this.secondaryTextColor = new RGBA_Bytes(51, 51, 51); } } } diff --git a/CustomWidgets/DropDownMenuWidget.cs b/CustomWidgets/DropDownMenuWidget.cs index d7c8dfc61..600a4c906 100644 --- a/CustomWidgets/DropDownMenuWidget.cs +++ b/CustomWidgets/DropDownMenuWidget.cs @@ -189,7 +189,7 @@ namespace MatterHackers.Agg.UI private void SetDisplayAttributes() { - this.TextColor = RGBA_Bytes.White; + this.TextColor = ActiveTheme.Instance.PrimaryTextColor; this.NormalColor = ActiveTheme.Instance.PrimaryBackgroundColor; this.HoverColor = RGBA_Bytes.Gray; this.MenuItemsBorderWidth = 1; diff --git a/CustomWidgets/ThemeColorSelectorWidget.cs b/CustomWidgets/ThemeColorSelectorWidget.cs index a844b88e0..235d65bec 100644 --- a/CustomWidgets/ThemeColorSelectorWidget.cs +++ b/CustomWidgets/ThemeColorSelectorWidget.cs @@ -24,10 +24,13 @@ namespace MatterHackers.MatterControl //colorText.VAnchor = Agg.UI.VAnchor.ParentCenter; //this.AddChild(colorText); //Temporary theme changer button - GuiWidget themeButtons = new GuiWidget(96, 42); + GuiWidget themeButtons = new GuiWidget(186, 42); + + int themeCount = ActiveTheme.Instance.AvailableThemes.Count; + themeButtons.BackgroundColor = RGBA_Bytes.White; int index = 0; - for (int x = 0; x < 5; x++) + for (int x = 0; x < themeCount/2; x++) { for (int y = 0; y < 2; y++) { @@ -49,7 +52,7 @@ namespace MatterHackers.MatterControl index++; themeButtons.AddChild(colorButton); } - } + } themeButtons.Margin = new BorderDouble(2); this.AddChild(themeButtons); this.VAnchor = VAnchor.ParentCenter; diff --git a/PartPreviewWindow/GcodeViewBasic.cs b/PartPreviewWindow/GcodeViewBasic.cs index 11afdda72..5c152bc41 100644 --- a/PartPreviewWindow/GcodeViewBasic.cs +++ b/PartPreviewWindow/GcodeViewBasic.cs @@ -222,7 +222,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { BorderDouble buttonMargin = new BorderDouble(top: 3); - expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Model"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); + string label = LocalizedString.Get("MODEL"); + expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(label, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); expandModelOptions.Margin = new BorderDouble(bottom: 2); buttonRightPanel.AddChild(expandModelOptions); expandModelOptions.Checked = true; @@ -232,7 +233,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow //modelOptionsContainer.Visible = false; buttonRightPanel.AddChild(modelOptionsContainer); - expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Layer"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); + expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("LAYER"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); expandLayerOptions.Margin = new BorderDouble(bottom: 2); //buttonRightPanel.AddChild(expandLayerOptions); @@ -241,7 +242,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerOptionsContainer.Visible = false; buttonRightPanel.AddChild(layerOptionsContainer); - expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("Display"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); + expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("DISPLAY"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png"); expandDisplayOptions.Margin = new BorderDouble(bottom: 2); buttonRightPanel.AddChild(expandDisplayOptions); expandDisplayOptions.Checked = true; @@ -279,10 +280,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow modelInfoContainer.HAnchor = HAnchor.ParentLeftRight; modelInfoContainer.Padding = new BorderDouble(5); - string printTimeLbl = LocalizedString.Get ("Print Time"); + string printTimeLbl = LocalizedString.Get ("PRINT TIME"); string printTimeLblFull = string.Format ("{0}:", printTimeLbl); // put in the print time - modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: RGBA_Bytes.White)); + modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:10)); { string timeRemainingText = "---"; @@ -302,42 +303,42 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } } - GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0}", timeRemainingText), textColor: RGBA_Bytes.White, pointSize: 10); - estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; - estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3); + GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0}", timeRemainingText), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 14); + //estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; + estimatedPrintTime.Margin = new BorderDouble(0, 9, 0 ,3); modelInfoContainer.AddChild(estimatedPrintTime); } - //modelInfoContainer.AddChild(new TextWidget("Size:", textColor: RGBA_Bytes.White)); + //modelInfoContainer.AddChild(new TextWidget("Size:", textColor: ActiveTheme.Instance.PrimaryTextColor)); - string filamentLengthLbl = LocalizedString.Get ("Filament Length"); + string filamentLengthLbl = LocalizedString.Get ("FILAMENT LENGTH"); string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl); // show the filament used - modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: RGBA_Bytes.White)); + modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9)); { double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter); - GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.0} mm", filamentUsed), textColor: RGBA_Bytes.White, pointSize: 10); - estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; - estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3); + GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.0} mm", filamentUsed), pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor); + //estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; + estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3); modelInfoContainer.AddChild(estimatedPrintTime); } - string filamentVolumeLbl = LocalizedString.Get ("Filament Volume"); + string filamentVolumeLbl = LocalizedString.Get ("FILAMENT VOLUME"); string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl); - modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: RGBA_Bytes.White)); + modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9)); { double filamentMm3 = gcodeViewWidget.LoadedGCode.GetFilamentCubicMm(ActiveSliceSettings.Instance.FillamentDiameter); - GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} cm3", filamentMm3/1000), textColor: RGBA_Bytes.White, pointSize: 10); - estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; - estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3); + GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} cm3", filamentMm3 / 1000), pointSize:14, textColor: ActiveTheme.Instance.PrimaryTextColor); + //estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; + estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3); modelInfoContainer.AddChild(estimatedPrintTime); } - string weightLbl = LocalizedString.Get("Weight"); + string weightLbl = LocalizedString.Get("EST. WEIGHT"); string weightLblFull = string.Format("{0}:", weightLbl); - modelInfoContainer.AddChild(new TextWidget(weightLblFull, textColor: RGBA_Bytes.White)); + modelInfoContainer.AddChild(new TextWidget(weightLblFull, pointSize: 9, textColor: ActiveTheme.Instance.SecondaryTextColor)); { var density = 1.0; string filamentType = "PLA"; @@ -352,13 +353,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow double filamentWeightGrams = gcodeViewWidget.LoadedGCode.GetFilamentWeightGrams(ActiveSliceSettings.Instance.FillamentDiameter, density); - GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} g", filamentWeightGrams), textColor: RGBA_Bytes.White, pointSize: 10); - estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; - estimatedPrintTime.Margin = new BorderDouble(3, 0, 0, 3); + GuiWidget estimatedPrintTime = new TextWidget(string.Format("{0:0.00} g", filamentWeightGrams), pointSize: 14, textColor: ActiveTheme.Instance.PrimaryTextColor); + //estimatedPrintTime.HAnchor = Agg.UI.HAnchor.ParentLeft; + estimatedPrintTime.Margin = new BorderDouble(0, 9, 0, 3); modelInfoContainer.AddChild(estimatedPrintTime); } - //modelInfoContainer.AddChild(new TextWidget("Layer Count:", textColor: RGBA_Bytes.White)); + //modelInfoContainer.AddChild(new TextWidget("Layer Count:", textColor: ActiveTheme.Instance.PrimaryTextColor)); buttonPanel.AddChild(modelInfoContainer); @@ -373,15 +374,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerInfoContainer.HAnchor = HAnchor.ParentLeftRight; layerInfoContainer.Padding = new BorderDouble(5); - layerInfoContainer.AddChild(new TextWidget("Layer Number:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Layer Height:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Num GCodes:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Filament Used:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Weight:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Print Time:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Extrude Speeds:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Move Speeds:", textColor: RGBA_Bytes.White)); - layerInfoContainer.AddChild(new TextWidget("Retract Speeds:", textColor: RGBA_Bytes.White)); + layerInfoContainer.AddChild(new TextWidget("Layer Number:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Layer Height:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Num GCodes:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Filament Used:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Weight:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Print Time:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Extrude Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Move Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor)); + layerInfoContainer.AddChild(new TextWidget("Retract Speeds:", textColor: ActiveTheme.Instance.PrimaryTextColor)); buttonPanel.AddChild(layerInfoContainer); @@ -397,7 +398,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerInfoContainer.Padding = new BorderDouble(5); // put in a show grid check box - CheckBox showGrid = new CheckBox(LocalizedString.Get("Show Grid"), textColor: RGBA_Bytes.White); + CheckBox showGrid = new CheckBox(LocalizedString.Get("Show Grid"), textColor: ActiveTheme.Instance.PrimaryTextColor); showGrid.Checked = gcodeViewWidget.RenderGrid; showGrid.CheckedStateChanged += (sender, e) => { @@ -406,7 +407,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerInfoContainer.AddChild(showGrid); // put in a show moves checkbox - CheckBox showMoves = new CheckBox(LocalizedString.Get("Show Moves"), textColor: RGBA_Bytes.White); + CheckBox showMoves = new CheckBox(LocalizedString.Get("Show Moves"), textColor: ActiveTheme.Instance.PrimaryTextColor); showMoves.Checked = gcodeViewWidget.RenderMoves; showMoves.CheckedStateChanged += (sender, e) => { @@ -415,7 +416,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow layerInfoContainer.AddChild(showMoves); // put in a show Retractions checkbox - CheckBox showRetractions = new CheckBox(LocalizedString.Get("Show Retractions"), textColor: RGBA_Bytes.White); + CheckBox showRetractions = new CheckBox(LocalizedString.Get("Show Retractions"), textColor: ActiveTheme.Instance.PrimaryTextColor); showRetractions.Checked = gcodeViewWidget.RenderRetractions; showRetractions.CheckedStateChanged += (sender, e) => { @@ -423,7 +424,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; layerInfoContainer.AddChild(showRetractions); - //layerInfoContainer.AddChild(new CheckBox("Show Retractions", textColor: RGBA_Bytes.White)); + //layerInfoContainer.AddChild(new CheckBox("Show Retractions", textColor: ActiveTheme.Instance.PrimaryTextColor)); buttonPanel.AddChild(layerInfoContainer); @@ -691,11 +692,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow :base(FlowDirection.LeftToRight) { this.gcodeViewWidget = gcodeViewWidget; - - textImageButtonFactory.normalTextColor = RGBA_Bytes.White; - textImageButtonFactory.hoverTextColor = RGBA_Bytes.White; - textImageButtonFactory.disabledTextColor = RGBA_Bytes.White; - textImageButtonFactory.pressedTextColor = RGBA_Bytes.White; + + textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; editCurrentLayerIndex = new NumberEdit(1, pixelWidth: 40); editCurrentLayerIndex.VAnchor = VAnchor.ParentCenter; @@ -740,10 +741,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { this.gcodeViewWidget = gcodeViewWidget; - textImageButtonFactory.normalTextColor = RGBA_Bytes.White; - textImageButtonFactory.hoverTextColor = RGBA_Bytes.White; - textImageButtonFactory.disabledTextColor = RGBA_Bytes.White; - textImageButtonFactory.pressedTextColor = RGBA_Bytes.White; + textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; prevLayerButton = textImageButtonFactory.Generate("<<"); prevLayerButton.Click += new Button.ButtonEventHandler(prevLayer_ButtonClick); diff --git a/PartPreviewWindow/PartPreviewBaseWidget.cs b/PartPreviewWindow/PartPreviewBaseWidget.cs index 486ea82b2..59bf79037 100644 --- a/PartPreviewWindow/PartPreviewBaseWidget.cs +++ b/PartPreviewWindow/PartPreviewBaseWidget.cs @@ -54,10 +54,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public PartPreviewBaseWidget() { - textImageButtonFactory.normalTextColor = RGBA_Bytes.White; - textImageButtonFactory.hoverTextColor = RGBA_Bytes.White; - textImageButtonFactory.disabledTextColor = RGBA_Bytes.White; - textImageButtonFactory.pressedTextColor = RGBA_Bytes.White; + textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; whiteButtonFactory.FixedWidth = 138; whiteButtonFactory.normalFillColor = RGBA_Bytes.White; @@ -66,10 +66,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow whiteButtonFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 200); expandMenuOptionFactory.FixedWidth = 138; - expandMenuOptionFactory.normalTextColor = RGBA_Bytes.White; - expandMenuOptionFactory.hoverTextColor = RGBA_Bytes.White; - expandMenuOptionFactory.disabledTextColor = RGBA_Bytes.White; - expandMenuOptionFactory.pressedTextColor = RGBA_Bytes.White; + expandMenuOptionFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + expandMenuOptionFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + expandMenuOptionFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; + expandMenuOptionFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; expandMenuOptionFactory.hoverFillColor = new RGBA_Bytes(255, 255, 255, 50); expandMenuOptionFactory.pressedFillColor = new RGBA_Bytes(255, 255, 255, 50); expandMenuOptionFactory.disabledFillColor = new RGBA_Bytes(255, 255, 255, 50); @@ -78,18 +78,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow checkboxButtonFactory.FixedWidth = 138; checkboxButtonFactory.borderWidth = 3; - checkboxButtonFactory.normalTextColor = RGBA_Bytes.White; + checkboxButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; checkboxButtonFactory.normalBorderColor = new RGBA_Bytes(0, 0, 0, 0); checkboxButtonFactory.normalFillColor = ActiveTheme.Instance.PrimaryBackgroundColor; - checkboxButtonFactory.hoverTextColor = RGBA_Bytes.White; + checkboxButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; checkboxButtonFactory.hoverBorderColor = new RGBA_Bytes(0, 0, 0, 50); checkboxButtonFactory.hoverFillColor = new RGBA_Bytes(0, 0, 0, 50); - checkboxButtonFactory.pressedTextColor = RGBA_Bytes.White; + checkboxButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; checkboxButtonFactory.pressedBorderColor = new RGBA_Bytes(0, 0, 0, 50); - checkboxButtonFactory.disabledTextColor = RGBA_Bytes.White; + checkboxButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; BackgroundColor = RGBA_Bytes.White; } diff --git a/PartPreviewWindow/View3DTransfromPart.cs b/PartPreviewWindow/View3DTransfromPart.cs index 2053341f0..52aa98f89 100644 --- a/PartPreviewWindow/View3DTransfromPart.cs +++ b/PartPreviewWindow/View3DTransfromPart.cs @@ -1020,17 +1020,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow PartInfoOptionContainer.Margin = new BorderDouble(8, 3); string sizeInfoLbl = LocalizedString.Get("Size"); string sizeInfoLblFull = "{0}:".FormatWith(sizeInfoLbl); - TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: RGBA_Bytes.White); + TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor); PartInfoOptionContainer.AddChild(sizeInfo); - TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: RGBA_Bytes.White); + TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); xSizeInfo.AutoExpandBoundsToText = true; PartInfoOptionContainer.AddChild(xSizeInfo); - TextWidget ySizeInfo = new TextWidget(" y 10.1", pointSize: 10, textColor: RGBA_Bytes.White); + TextWidget ySizeInfo = new TextWidget(" y 10.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); ySizeInfo.AutoExpandBoundsToText = true; PartInfoOptionContainer.AddChild(ySizeInfo); - - TextWidget zSizeInfo = new TextWidget(" z 100.1", pointSize: 10, textColor: RGBA_Bytes.White); + + TextWidget zSizeInfo = new TextWidget(" z 100.1", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); zSizeInfo.AutoExpandBoundsToText = true; PartInfoOptionContainer.AddChild(zSizeInfo); } @@ -1114,7 +1114,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow string scaleRatioLblTxt = LocalizedString.Get("Ratio"); string scaleRatioLblTxtFull = "{0}:".FormatWith(scaleRatioLblTxt); - TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: RGBA_Bytes.White); + TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: ActiveTheme.Instance.PrimaryTextColor); scaleRatioLabel.VAnchor = VAnchor.ParentCenter; scaleRatioContainer.AddChild(scaleRatioLabel); @@ -1256,7 +1256,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow string degreesLabelTxt = LocalizedString.Get("Degrees"); string degreesLabelTxtFull = "{0}:".FormatWith(degreesLabelTxt); - TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: RGBA_Bytes.White); + TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: ActiveTheme.Instance.PrimaryTextColor); degreesContainer.AddChild(degreesLabel); degreesContainer.AddChild(horizontalSpacer); @@ -1271,7 +1271,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow rotateButtonContainer.HAnchor = HAnchor.ParentLeftRight; Button rotateXButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png"); - TextWidget centeredX = new TextWidget("X", pointSize: 10, textColor: RGBA_Bytes.White); centeredX.Margin = new BorderDouble(3, 0, 0, 0); centeredX.AnchorCenter(); rotateXButton.AddChild(centeredX); + TextWidget centeredX = new TextWidget("X", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredX.Margin = new BorderDouble(3, 0, 0, 0); centeredX.AnchorCenter(); rotateXButton.AddChild(centeredX); rotateButtonContainer.AddChild(rotateXButton); rotateControls.Add(rotateXButton); rotateXButton.Click += (object sender, MouseEventArgs mouseEvent) => @@ -1295,7 +1295,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; Button rotateYButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png"); - TextWidget centeredY = new TextWidget("Y", pointSize: 10, textColor: RGBA_Bytes.White); centeredY.Margin = new BorderDouble(3, 0, 0, 0); centeredY.AnchorCenter(); rotateYButton.AddChild(centeredY); + TextWidget centeredY = new TextWidget("Y", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredY.Margin = new BorderDouble(3, 0, 0, 0); centeredY.AnchorCenter(); rotateYButton.AddChild(centeredY); rotateButtonContainer.AddChild(rotateYButton); rotateControls.Add(rotateYButton); rotateYButton.Click += (object sender, MouseEventArgs mouseEvent) => @@ -1319,7 +1319,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; Button rotateZButton = textImageButtonFactory.Generate("", "icon_rotate_32x32.png"); - TextWidget centeredZ = new TextWidget("Z", pointSize: 10, textColor: RGBA_Bytes.White); centeredZ.Margin = new BorderDouble(3, 0, 0, 0); centeredZ.AnchorCenter(); rotateZButton.AddChild(centeredZ); + TextWidget centeredZ = new TextWidget("Z", pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor); centeredZ.Margin = new BorderDouble(3, 0, 0, 0); centeredZ.AnchorCenter(); rotateZButton.AddChild(centeredZ); rotateButtonContainer.AddChild(rotateZButton); rotateControls.Add(rotateZButton); rotateZButton.Click += (object sender, MouseEventArgs mouseEvent) => diff --git a/PrintQueue/PrintQueueItem.cs b/PrintQueue/PrintQueueItem.cs index af8eb4a93..ab20cfbc0 100644 --- a/PrintQueue/PrintQueueItem.cs +++ b/PrintQueue/PrintQueueItem.cs @@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.PrintQueue partLabel.TextColor = WidgetTextColor; partLabel.MinimumSize = new Vector2(1, 16); - string partStatusLblTxt = LocalizedString.Get ("Status"); + string partStatusLblTxt = LocalizedString.Get ("STATUS"); string partStatusLblTxtTest = LocalizedString.Get ("Queued to Print"); string partStatusLblTxtFull = "{0}: {1}".FormatWith(partStatusLblTxt,partStatusLblTxtTest); @@ -438,8 +438,8 @@ namespace MatterHackers.MatterControl.PrintQueue { //Set background and text color to new theme this.BackgroundColor = ActiveTheme.Instance.PrimaryAccentColor; - this.partLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor; - this.partStatus.TextColor = ActiveTheme.Instance.PrimaryTextColor; + this.partLabel.TextColor = RGBA_Bytes.White; + this.partStatus.TextColor = RGBA_Bytes.White; this.Invalidate(); } } @@ -462,7 +462,7 @@ namespace MatterHackers.MatterControl.PrintQueue //RoundedRect rectBorder = new RoundedRect(Bounds, 0); this.BackgroundColor = ActiveTheme.Instance.SecondaryAccentColor; - SetTextColors(ActiveTheme.Instance.PrimaryTextColor); + SetTextColors(RGBA_Bytes.White); //graphics2D.Render(new Stroke(rectBorder, 4), ActiveTheme.Instance.SecondaryAccentColor); } diff --git a/PrintQueue/QueueControlsWidget.cs b/PrintQueue/QueueControlsWidget.cs index 7799c6803..5784c4258 100644 --- a/PrintQueue/QueueControlsWidget.cs +++ b/PrintQueue/QueueControlsWidget.cs @@ -24,11 +24,11 @@ namespace MatterHackers.MatterControl.PrintQueue public QueueControlsWidget() { SetDisplayAttributes(); - - textImageButtonFactory.normalTextColor = RGBA_Bytes.White; - textImageButtonFactory.hoverTextColor = RGBA_Bytes.White; - textImageButtonFactory.disabledTextColor = RGBA_Bytes.White; - textImageButtonFactory.pressedTextColor = RGBA_Bytes.White; + + textImageButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.disabledTextColor = ActiveTheme.Instance.PrimaryTextColor; + textImageButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor; textImageButtonFactory.borderWidth = 0; FlowLayoutWidget allControls = new FlowLayoutWidget(FlowDirection.TopToBottom); diff --git a/PrinterControls/ManualPrinterControls.cs b/PrinterControls/ManualPrinterControls.cs index 7c75f839a..d753ec3df 100644 --- a/PrinterControls/ManualPrinterControls.cs +++ b/PrinterControls/ManualPrinterControls.cs @@ -365,7 +365,7 @@ namespace MatterHackers.MatterControl FlowLayoutWidget leftToRight = new FlowLayoutWidget(); leftToRight.Padding = new BorderDouble(3, 0, 0, 5); - TextWidget fanSpeedDescription = new TextWidget(LocalizedString.Get("Fan Speed:"), textColor: RGBA_Bytes.White); + TextWidget fanSpeedDescription = new TextWidget(LocalizedString.Get("Fan Speed:"), textColor: ActiveTheme.Instance.PrimaryTextColor); fanSpeedDescription.VAnchor = Agg.UI.VAnchor.ParentCenter; leftToRight.AddChild(fanSpeedDescription); @@ -392,7 +392,7 @@ namespace MatterHackers.MatterControl GuiWidget topLine = new GuiWidget(10, 1); topLine.Margin = new BorderDouble(0, 5); topLine.HAnchor = Agg.UI.HAnchor.ParentLeftRight; - topLine.BackgroundColor = RGBA_Bytes.White; + topLine.BackgroundColor = ActiveTheme.Instance.PrimaryTextColor; return topLine; } @@ -425,7 +425,7 @@ namespace MatterHackers.MatterControl feedRateLeftToRight = new FlowLayoutWidget(); feedRateDescription = new TextWidget(LocalizedString.Get("Speed Multiplier")); - feedRateDescription.TextColor = RGBA_Bytes.White; + feedRateDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor; feedRateLeftToRight.AddChild(feedRateDescription); feedRateRatioSlider = new Slider(new Vector2(), 300, minFeedRateRatio, maxFeedRateRatio); feedRateRatioSlider.Margin = new BorderDouble(5, 0); @@ -456,7 +456,7 @@ namespace MatterHackers.MatterControl FlowLayoutWidget leftToRight = new FlowLayoutWidget(); extrusionDescription = new TextWidget(LocalizedString.Get("Extrusion Multiplier")); - extrusionDescription.TextColor = RGBA_Bytes.White; + extrusionDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor; leftToRight.AddChild(extrusionDescription); extrusionRatioSlider = new Slider(new Vector2(), 300, minExtrutionRatio, maxExtrusionRatio); extrusionRatioSlider.Margin = new BorderDouble(5, 0); diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index c390bf62d..d8dce7dd0 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -1407,3 +1407,51 @@ Translated:Not connected. Press 'Connect' to enable printing. English:Loading Parts Translated:Loading Parts +English:CONNECT +Translated:CONNECT + +English:DISCONNECT +Translated:DISCONNECT + +English:OPTIONS +Translated:OPTIONS + +English:QUEUE +Translated:QUEUE + +English:STATUS +Translated:STATUS + +English:CONTROLS +Translated:CONTROLS + +English:SLICE SETTINGS +Translated:SLICE SETTINGS + +English:CONFIGURATION +Translated:CONFIGURATION + +English:MODEL +Translated:MODEL + +English:LAYER +Translated:LAYER + +English:DISPLAY +Translated:DISPLAY + +English:PRINT TIME +Translated:PRINT TIME + +English:FILAMENT LENGTH +Translated:FILAMENT LENGTH + +English:FILAMENT VOLUME +Translated:FILAMENT VOLUME + +English:WEIGHT +Translated:WEIGHT + +English:EST. WEIGHT +Translated:EST. WEIGHT +