diff --git a/PartPreviewWindow/View3D/PrinterBar/PrintPopupMenu.cs b/PartPreviewWindow/View3D/PrinterBar/PrintPopupMenu.cs index f40b27b98..203256389 100644 --- a/PartPreviewWindow/View3D/PrinterBar/PrintPopupMenu.cs +++ b/PartPreviewWindow/View3D/PrinterBar/PrintPopupMenu.cs @@ -28,6 +28,7 @@ either expressed or implied, of the FreeBSD Project. */ using System; +using System.Linq; using System.Threading; using MatterHackers.Agg; using MatterHackers.Agg.UI; @@ -75,7 +76,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Padding = 5, MinimumSize = new VectorMath.Vector2(400, 65), Margin = new BorderDouble(top: 10), - BackgroundColor = theme.MinimalShade }; column.AddChild(optionsPanel); @@ -86,6 +86,20 @@ namespace MatterHackers.MatterControl.PartPreviewWindow var settingsData = SettingsOrganizer.Instance.GetSettingsData(key); var row = SliceSettingsTabView.CreateItemRow(settingsData, settingsContext, printer, Color.Black, theme, ref tabIndex); + var lightGray = new Color("#aaa"); + + foreach (var widget in row.Descendants()) + { + widget.Border = 1; + widget.BorderColor = lightGray; + } + + foreach (var widget in row.Descendants()) + { + widget.Border = 1; + widget.BorderColor = lightGray; + } + optionsPanel.AddChild(row); } diff --git a/Utilities/InspectForm.cs b/Utilities/InspectForm.cs index 9aad0e0cb..9b25d2328 100644 --- a/Utilities/InspectForm.cs +++ b/Utilities/InspectForm.cs @@ -81,20 +81,6 @@ namespace MatterHackers.MatterControl protected override bool ShowWithoutActivation => true; - protected override CreateParams CreateParams - { - get - { - CreateParams baseParams = base.CreateParams; - - const int WS_EX_NOACTIVATE = 0x08000000; - const int WS_EX_TOOLWINDOW = 0x00000080; - baseParams.ExStyle |= (int)(WS_EX_NOACTIVATE); // | WS_EX_TOOLWINDOW); - - return baseParams; - } - } - private HashSet aggAncestryTree = new HashSet(); //private HashSet sceneAncestryTree = new HashSet(); @@ -147,6 +133,11 @@ namespace MatterHackers.MatterControl activeTreeNode = treeNode; aggTreeView.Invalidate(); } + else + { + this.AddItemEnsureAncestors(_inspectedWidget); + } + _inspectedWidget.Invalidate(); } @@ -172,9 +163,7 @@ namespace MatterHackers.MatterControl } } - private Font boldFont; - - private void AddItem(GuiWidget widget, string text = null, TreeNode childNode = null, bool showAllParents = true) + private void AddItemEnsureAncestors(GuiWidget widget, string text = null, TreeNode childNode = null, bool showAllParents = true) { if (text == null) { @@ -196,11 +185,6 @@ namespace MatterHackers.MatterControl Tag = widget }; - if (boldFont == null) - { - boldFont = new Font(node.NodeFont, FontStyle.Bold); - } - if (childNode != null) { node.Nodes.Add(childNode); @@ -217,7 +201,7 @@ namespace MatterHackers.MatterControl } else { - AddItem(parent, parent.Text, node); + AddItemEnsureAncestors(parent, null, node); } } else @@ -384,16 +368,6 @@ namespace MatterHackers.MatterControl } } - private void AddAllItems(IEnumerable items) - { - if (items != null) - { - foreach (var item in items) - { - this.AddItem(item); - } - } - } protected override void OnFormClosing(FormClosingEventArgs e) { @@ -435,7 +409,7 @@ namespace MatterHackers.MatterControl TextRenderer.DrawText( e.Graphics, node.Text, - node == activeTreeNode ? boldFont : node.NodeFont, + node.NodeFont, new Point(node.Bounds.Left, node.Bounds.Top), widget.ActuallyVisibleOnScreen() ? SystemColors.ControlText : SystemColors.GrayText, System.Drawing.Color.Transparent); @@ -455,7 +429,7 @@ namespace MatterHackers.MatterControl TextRenderer.DrawText( e.Graphics, node.Text, - node == activeTreeNode ? boldFont : node.NodeFont, + node.NodeFont, new Point(node.Bounds.Left, node.Bounds.Top), SystemColors.ControlText, System.Drawing.Color.Transparent); @@ -489,5 +463,14 @@ namespace MatterHackers.MatterControl } } + + protected override void OnKeyUp(System.Windows.Forms.KeyEventArgs e) + { + if (e.KeyCode == System.Windows.Forms.Keys.F1) + { + this.Inspecting = !this.Inspecting; + } + base.OnKeyUp(e); + } } }