Merge pull request #2880 from jlewin/design_tools

Use theme default font size
This commit is contained in:
johnlewin 2018-01-12 14:57:56 -08:00 committed by GitHub
commit 8002c1bcdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 173 additions and 130 deletions

View file

@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.AboutPage
UserSettings.Instance.set(UserSettingsKey.UpdateFeedType, "release");
}
var releaseOptionsDropList = new DropDownList("Development", theme.Colors.PrimaryTextColor, maxHeight: 200)
var releaseOptionsDropList = new DropDownList("Development", theme.Colors.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize)
{
HAnchor = HAnchor.Fit
};

View file

@ -42,7 +42,8 @@ namespace MatterHackers.MatterControl
private EventHandler unregisterEvents;
int lastSelectedIndex = -1;
public PrinterSelector() : base("Printers".Localize() + "... ", ActiveTheme.Instance.PrimaryTextColor)
public PrinterSelector(ThemeConfig theme)
: base("Printers".Localize() + "... ", theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
{
Rebuild();

View file

@ -104,14 +104,14 @@ namespace MatterHackers.MatterControl.ActionBar
},
enforceGutter: false));
heatToggle = hotendRow.Decendants<CheckBox>().FirstOrDefault();
heatToggle = hotendRow.Descendants<CheckBox>().FirstOrDefault();
heatToggle.Name = "Toggle Heater";
int tabIndex = 0;
var settingsContext = new SettingsContext(printer, null, NamedSettingsLayers.All);
var settingsData = SliceSettingsOrganizer.Instance.GetSettingsData(SettingsKey.bed_temperature);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, ref tabIndex);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, ApplicationController.Instance.Theme, ref tabIndex);
container.AddChild(row);
// add in the temp graph
@ -138,8 +138,8 @@ namespace MatterHackers.MatterControl.ActionBar
}
};
var valueField = row.Decendants<MHNumberEdit>().FirstOrDefault();
var settingsRow = row.Decendants<SliceSettingsRow>().FirstOrDefault();
var valueField = row.Descendants<MHNumberEdit>().FirstOrDefault();
var settingsRow = row.Descendants<SliceSettingsRow>().FirstOrDefault();
ActiveSliceSettings.SettingChanged.RegisterEvent((s, e) =>
{
if (e is StringEventArgs stringEvent)

View file

@ -239,14 +239,14 @@ namespace MatterHackers.MatterControl.ActionBar
},
enforceGutter: false));
heatToggle = hotendRow.Decendants<CheckBox>().FirstOrDefault();
heatToggle = hotendRow.Descendants<CheckBox>().FirstOrDefault();
heatToggle.Name = "Toggle Heater";
int tabIndex = 0;
var settingsContext = new SettingsContext(printer, null, NamedSettingsLayers.All);
// TODO: make this be for the correct extruder
var settingsData = SliceSettingsOrganizer.Instance.GetSettingsData(TemperatureKey);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, ref tabIndex);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, ApplicationController.Instance.Theme, ref tabIndex);
container.AddChild(row);
@ -272,9 +272,9 @@ namespace MatterHackers.MatterControl.ActionBar
}
};
var valueField = row.Decendants<MHNumberEdit>().FirstOrDefault();
var valueField = row.Descendants<MHNumberEdit>().FirstOrDefault();
valueField.Name = "Temperature Input";
var settingsRow = row.Decendants<SliceSettingsRow>().FirstOrDefault();
var settingsRow = row.Descendants<SliceSettingsRow>().FirstOrDefault();
ActiveSliceSettings.SettingChanged.RegisterEvent((s, e) =>
{
if (e is StringEventArgs stringEvent)

View file

@ -161,7 +161,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
#if !__ANDROID__
{
// ThumbnailRendering
var thumbnailsModeDropList = new DropDownList("", ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200)
var thumbnailsModeDropList = new DropDownList("", ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200, pointSize: ApplicationController.Instance.Theme.DefaultFontSize)
{
TextColor = menuTextColor,
};

View file

@ -40,10 +40,9 @@ namespace MatterHackers.MatterControl.PrinterControls
// label
buttonRow.AddChild(
new TextWidget("")
new TextWidget("", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
{
AutoExpandBoundsToText = true,
TextColor = ActiveTheme.Instance.PrimaryTextColor,
VAnchor = VAnchor.Center,
Text = "Software Print Leveling".Localize()
});

View file

@ -43,7 +43,7 @@ namespace MatterHackers.MatterControl
: base(FlowDirection.TopToBottom)
{
int tabIndex = 0;
var rowItem = sliceSettingsWidget.CreateItemRow(SliceSettingsOrganizer.SettingsData["printer_name"], ref tabIndex);
var rowItem = sliceSettingsWidget.CreateItemRow(SliceSettingsOrganizer.SettingsData["printer_name"],ref tabIndex, theme);
var firstChild = rowItem.Children.FirstOrDefault();
firstChild.HAnchor = HAnchor.Absolute;
@ -87,7 +87,8 @@ namespace MatterHackers.MatterControl
primaryTabControl,
scrollable,
theme,
hasClose: false)
hasClose: false,
pointSize: theme.DefaultFontSize)
{
Name = section.Name + " Tab",
InactiveTabColor = Color.Transparent,

View file

@ -213,7 +213,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
content,
theme,
hasClose: kvp.Value is ConfigurePrinterWidget,
pointSize: theme.FontSize11)
pointSize: theme.DefaultFontSize)
{
Name = tabTitle + " Tab",
InactiveTabColor = Color.Transparent,

View file

@ -41,7 +41,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
{
private MoveButtonFactory buttonFactory = new MoveButtonFactory()
{
FontSize = 13,
FontSize = ApplicationController.Instance.Theme.DefaultFontSize,
};
public ZAxisControls(PrinterConfig printer, ThemeConfig theme, bool smallScreen) :

View file

@ -134,7 +134,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
var existingPrinterSection = CreateSection(leftContent, "Open Existing".Localize() + ":");
var printerSelector = new PrinterSelector()
var printerSelector = new PrinterSelector(theme)
{
Margin = new BorderDouble(left: 15)
};

View file

@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
if (!opperationApplied && !selectionHasBeenMade)
{
// select the last item
if (tabContainer.Decendants().Where((d) => d is ICheckbox).Last() is ICheckbox firstCheckBox)
if (tabContainer.Descendants().Where((d) => d is ICheckbox).Last() is ICheckbox firstCheckBox)
{
firstCheckBox.Checked = true;
}

View file

@ -154,7 +154,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
if (!opperationApplied && !selectionHasBeenMade)
{
// select the last item
if (tabContainer.Decendants().Where((d) => d is ICheckbox).Last() is ICheckbox firstCheckBox)
if (tabContainer.Descendants().Where((d) => d is ICheckbox).Last() is ICheckbox firstCheckBox)
{
firstCheckBox.Checked = true;
}

View file

@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{ 5, "5" },
};
var dropDownList = new DropDownList("Custom", ActiveTheme.Instance.PrimaryTextColor, Direction.Down)
var dropDownList = new DropDownList("Custom", ActiveTheme.Instance.PrimaryTextColor, Direction.Down, ApplicationController.Instance.Theme.DefaultFontSize)
{
TextColor = Color.Black,
Margin = new BorderDouble(35, 15, 35, 5),

View file

@ -84,7 +84,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
foreach (var key in new[] { "layer_height", "fill_density", "support_material", "create_raft", "spiral_vase", "layer_to_pause" })
{
var settingsData = SliceSettingsOrganizer.Instance.GetSettingsData(key);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, ref tabIndex);
var row = SliceSettingsWidget.CreateItemRow(settingsData, settingsContext, printer, Color.Black, theme, ref tabIndex);
optionsPanel.AddChild(row);
}

View file

@ -207,7 +207,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{ 10, "cm to mm (10)"},
};
var dropDownList = new DropDownList("Scale".Localize(), theme.Colors.PrimaryTextColor, Direction.Down)
var dropDownList = new DropDownList("Scale".Localize(), theme.Colors.PrimaryTextColor, Direction.Down, pointSize: theme.DefaultFontSize)
{
HAnchor = HAnchor.Left
};

View file

@ -46,6 +46,8 @@ namespace MatterHackers.MatterControl
public MacroDetailPage(GCodeMacro gcodeMacro, PrinterSettings printerSettings)
{
var theme = ApplicationController.Instance.Theme;
// Form validation fields
MHTextEditWidget macroNameInput;
MHTextEditWidget macroCommandInput;
@ -61,7 +63,7 @@ namespace MatterHackers.MatterControl
contentRow.AddChild(new TextWidget("Macro Name".Localize() + ":", 0, 0, 12)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
HAnchor = HAnchor.Stretch,
Margin = new BorderDouble(0, 0, 0, 1)
});
@ -73,14 +75,14 @@ namespace MatterHackers.MatterControl
contentRow.AddChild(macroNameError = new TextWidget("Give the macro a name".Localize() + ".", 0, 0, 10)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
HAnchor = HAnchor.Stretch,
Margin = elementMargin
});
contentRow.AddChild(new TextWidget("Macro Commands".Localize() + ":", 0, 0, 12)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
HAnchor = HAnchor.Stretch,
Margin = new BorderDouble(0, 0, 0, 1)
});
@ -96,7 +98,7 @@ namespace MatterHackers.MatterControl
contentRow.AddChild(macroCommandError = new TextWidget("This should be in 'G-Code'".Localize() + ".", 0, 0, 10)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
HAnchor = HAnchor.Stretch,
Margin = elementMargin
});
@ -109,13 +111,13 @@ namespace MatterHackers.MatterControl
container.AddChild(new TextWidget("Where to show this macro:")
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
VAnchor = VAnchor.Center
});
var macroUiLocation = new DropDownList("Default", ActiveTheme.Instance.PrimaryTextColor, Direction.Up)
var macroUiLocation = new DropDownList("Default", theme.Colors.PrimaryTextColor, Direction.Up, pointSize: theme.DefaultFontSize)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
TextColor = theme.Colors.PrimaryTextColor,
Margin = new BorderDouble(5, 0),
VAnchor = VAnchor.Center
};

View file

@ -27,15 +27,9 @@ of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
using MatterHackers.Agg.Platform;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using System.Collections.Generic;
using MatterHackers.MatterControl.SettingsManagement;
using System.IO;
using System.Linq;
using MatterHackers.Agg;
using System;
using MatterHackers.Agg.UI;
namespace MatterHackers.MatterControl
{
@ -44,7 +38,7 @@ namespace MatterHackers.MatterControl
private List<KeyValuePair<string, string>> listSource;
public BoundDropList(string noSelectionString, int maxHeight = 0)
: base(noSelectionString, ActiveTheme.Instance.PrimaryTextColor, maxHeight: maxHeight)
: base(noSelectionString, ActiveTheme.Instance.PrimaryTextColor, maxHeight: maxHeight, pointSize: ApplicationController.Instance.Theme.DefaultFontSize)
{
}

View file

@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl
};
this.AddChild(headerRow);
filterOutput = new CheckBox("Filter Output".Localize())
filterOutput = new CheckBox("Filter Output".Localize(), textSize: theme.DefaultFontSize)
{
TextColor = ActiveTheme.Instance.PrimaryTextColor,
VAnchor = VAnchor.Bottom,
@ -85,7 +85,7 @@ namespace MatterHackers.MatterControl
};
headerRow.AddChild(filterOutput);
autoUppercase = new CheckBox("Auto Uppercase".Localize())
autoUppercase = new CheckBox("Auto Uppercase".Localize(), textSize: theme.DefaultFontSize)
{
Margin = new BorderDouble(left: 25),
Checked = UserSettings.Instance.Fields.GetBool(UserSettingsKey.TerminalAutoUppercase, true),

View file

@ -32,7 +32,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using MatterHackers.Agg;
using MatterHackers.Agg.ImageProcessing;
using MatterHackers.Agg.Platform;
using MatterHackers.Agg.UI;
using MatterHackers.Agg.VertexSource;
@ -59,7 +58,10 @@ namespace MatterHackers.MatterControl
private MoveButton zPlusControl;
private MoveButton zMinusControl;
private MoveButtonFactory moveButtonFactory = new MoveButtonFactory();
private MoveButtonFactory moveButtonFactory = new MoveButtonFactory()
{
FontSize = ApplicationController.Instance.Theme.DefaultFontSize
};
private PrinterConfig printer;
public JogControls(PrinterConfig printer, XYZColors colors)
@ -72,7 +74,7 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget allControlsTopToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
allControlsTopToBottom.HAnchor |= Agg.UI.HAnchor.Stretch;
allControlsTopToBottom.HAnchor |= HAnchor.Stretch;
{
FlowLayoutWidget allControlsLeftToRight = new FlowLayoutWidget();
@ -85,7 +87,7 @@ namespace MatterHackers.MatterControl
xYZControls.AddChild(xyGrid);
FlowLayoutWidget zButtons = CreateZButtons(printer, XYZColors.zColor, buttonSeparationDistance, out zPlusControl, out zMinusControl);
zButtons.VAnchor = Agg.UI.VAnchor.Bottom;
zButtons.VAnchor = VAnchor.Bottom;
xYZControls.AddChild(zButtons);
xYZWithDistance.AddChild(xYZControls);
}
@ -93,7 +95,7 @@ namespace MatterHackers.MatterControl
// add in some movement radio buttons
FlowLayoutWidget setMoveDistanceControl = new FlowLayoutWidget();
TextWidget buttonsLabel = new TextWidget("Distance:", textColor: Color.White);
buttonsLabel.VAnchor = Agg.UI.VAnchor.Center;
buttonsLabel.VAnchor = VAnchor.Center;
//setMoveDistanceControl.AddChild(buttonsLabel);
{
@ -104,21 +106,21 @@ namespace MatterHackers.MatterControl
var radioList = new ObservableCollection<GuiWidget>();
movePointZeroTwoMmButton = buttonFactory.GenerateRadioButton("0.02");
movePointZeroTwoMmButton.VAnchor = Agg.UI.VAnchor.Center;
movePointZeroTwoMmButton.VAnchor = VAnchor.Center;
movePointZeroTwoMmButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetXYZMoveAmount(.02); };
movePointZeroTwoMmButton.SiblingRadioButtonList = radioList;
radioList.Add(movePointZeroTwoMmButton);
moveRadioButtons.AddChild(movePointZeroTwoMmButton);
RadioButton pointOneButton = buttonFactory.GenerateRadioButton("0.1");
pointOneButton.VAnchor = Agg.UI.VAnchor.Center;
pointOneButton.VAnchor = VAnchor.Center;
pointOneButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetXYZMoveAmount(.1); };
pointOneButton.SiblingRadioButtonList = radioList;
radioList.Add(pointOneButton);
moveRadioButtons.AddChild(pointOneButton);
moveOneMmButton = buttonFactory.GenerateRadioButton("1");
moveOneMmButton.VAnchor = Agg.UI.VAnchor.Center;
moveOneMmButton.VAnchor = VAnchor.Center;
moveOneMmButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetXYZMoveAmount(1); };
moveOneMmButton.SiblingRadioButtonList = radioList;
radioList.Add(moveOneMmButton);
@ -135,7 +137,7 @@ namespace MatterHackers.MatterControl
tooBigForBabyStepping.AddChild(tooBigFlowLayout);
tenButton = buttonFactory.GenerateRadioButton("10");
tenButton.VAnchor = Agg.UI.VAnchor.Center;
tenButton.VAnchor = VAnchor.Center;
tenButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetXYZMoveAmount(10); };
tenButton.SiblingRadioButtonList = radioList;
radioList.Add(tenButton);
@ -143,7 +145,7 @@ namespace MatterHackers.MatterControl
tooBigFlowLayout.AddChild(tenButton);
oneHundredButton = buttonFactory.GenerateRadioButton("100");
oneHundredButton.VAnchor = Agg.UI.VAnchor.Center;
oneHundredButton.VAnchor = VAnchor.Center;
oneHundredButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetXYZMoveAmount(100); };
oneHundredButton.SiblingRadioButtonList = radioList;
radioList.Add(oneHundredButton);
@ -160,11 +162,11 @@ namespace MatterHackers.MatterControl
tooBigFlowLayout.AddChild(new TextWidget("mm", textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 8)
{
Margin = new BorderDouble(left: 10),
VAnchor = Agg.UI.VAnchor.Center
VAnchor = VAnchor.Center
});
}
setMoveDistanceControl.HAnchor = Agg.UI.HAnchor.Left;
setMoveDistanceControl.HAnchor = HAnchor.Left;
xYZWithDistance.AddChild(setMoveDistanceControl);
}
@ -174,7 +176,7 @@ namespace MatterHackers.MatterControl
allControlsLeftToRight.AddChild(GetHotkeyControlContainer());
#endif
GuiWidget barBetweenZAndE = new GuiWidget(2, 2);
barBetweenZAndE.VAnchor = Agg.UI.VAnchor.Stretch;
barBetweenZAndE.VAnchor = VAnchor.Stretch;
barBetweenZAndE.BackgroundColor = Color.White;
barBetweenZAndE.Margin = new BorderDouble(distanceBetweenControls, 5);
allControlsLeftToRight.AddChild(barBetweenZAndE);
@ -436,7 +438,7 @@ namespace MatterHackers.MatterControl
TextWidget eMinusControlLabel = new TextWidget("Retract".Localize(), pointSize: 11);
eMinusControlLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
eMinusControlLabel.VAnchor = Agg.UI.VAnchor.Center;
eMinusControlLabel.VAnchor = VAnchor.Center;
eMinusButtonAndText.AddChild(eMinusControlLabel);
eButtons.AddChild(eMinusButtonAndText);
@ -482,7 +484,7 @@ namespace MatterHackers.MatterControl
TextWidget ePlusControlLabel = new TextWidget("Extrude".Localize(), pointSize: 11);
ePlusControlLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
ePlusControlLabel.VAnchor = Agg.UI.VAnchor.Center;
ePlusControlLabel.VAnchor = VAnchor.Center;
ePlusButtonAndText.AddChild(ePlusControlLabel);
eButtons.AddChild(ePlusButtonAndText);
ePlusButtonAndText.HAnchor = HAnchor.Fit;
@ -494,7 +496,7 @@ namespace MatterHackers.MatterControl
// add in some movement radio buttons
FlowLayoutWidget setMoveDistanceControl = new FlowLayoutWidget();
TextWidget buttonsLabel = new TextWidget("Distance:", textColor: Color.White);
buttonsLabel.VAnchor = Agg.UI.VAnchor.Center;
buttonsLabel.VAnchor = VAnchor.Center;
//setMoveDistanceControl.AddChild(buttonsLabel);
{
@ -502,15 +504,15 @@ namespace MatterHackers.MatterControl
var moveRadioButtons = new FlowLayoutWidget();
RadioButton oneButton = buttonFactory.GenerateRadioButton("1");
oneButton.VAnchor = Agg.UI.VAnchor.Center;
oneButton.VAnchor = VAnchor.Center;
oneButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetEMoveAmount(1); };
moveRadioButtons.AddChild(oneButton);
RadioButton tenButton = buttonFactory.GenerateRadioButton("10");
tenButton.VAnchor = Agg.UI.VAnchor.Center;
tenButton.VAnchor = VAnchor.Center;
tenButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetEMoveAmount(10); };
moveRadioButtons.AddChild(tenButton);
RadioButton oneHundredButton = buttonFactory.GenerateRadioButton("100");
oneHundredButton.VAnchor = Agg.UI.VAnchor.Center;
oneHundredButton.VAnchor = VAnchor.Center;
oneHundredButton.CheckedStateChanged += (sender, e) => { if (((RadioButton)sender).Checked) SetEMoveAmount(100); };
moveRadioButtons.AddChild(oneHundredButton);
tenButton.Checked = true;
@ -519,10 +521,10 @@ namespace MatterHackers.MatterControl
}
var mmLabel = new TextWidget("mm", textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 8);
mmLabel.VAnchor = Agg.UI.VAnchor.Center;
mmLabel.VAnchor = VAnchor.Center;
mmLabel.Margin = new BorderDouble(left: 10);
setMoveDistanceControl.AddChild(mmLabel);
setMoveDistanceControl.HAnchor = Agg.UI.HAnchor.Left;
setMoveDistanceControl.HAnchor = HAnchor.Left;
eButtons.AddChild(setMoveDistanceControl);
eButtons.HAnchor = HAnchor.Fit;
@ -556,7 +558,10 @@ namespace MatterHackers.MatterControl
{
FlowLayoutWidget zButtons = new FlowLayoutWidget(FlowDirection.TopToBottom);
{
MoveButtonFactory moveButtonFactory = new MoveButtonFactory();
var moveButtonFactory = new MoveButtonFactory()
{
FontSize = ApplicationController.Instance.Theme.DefaultFontSize
};
moveButtonFactory.Colors.Fill.Normal = color;
zPlusControl = CreateMoveButton(printer, "Z+", PrinterConnection.Axis.Z, printer.Settings.ZSpeed(), levelingButtons, moveButtonFactory);
@ -564,10 +569,12 @@ namespace MatterHackers.MatterControl
zPlusControl.ToolTipText = "Move Z positive".Localize();
zButtons.AddChild(zPlusControl);
GuiWidget spacer = new GuiWidget(2, buttonSeparationDistance);
spacer.HAnchor = Agg.UI.HAnchor.Center;
spacer.BackgroundColor = XYZColors.zColor;
zButtons.AddChild(spacer);
// spacer
zButtons.AddChild(new GuiWidget(2, buttonSeparationDistance)
{
HAnchor = HAnchor.Center,
BackgroundColor = XYZColors.zColor
});
zMinusControl = CreateMoveButton(printer, "Z-", PrinterConnection.Axis.Z, printer.Settings.ZSpeed(), levelingButtons, moveButtonFactory);
zMinusControl.ToolTipText = "Move Z negative".Localize();
@ -584,17 +591,19 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget xButtons = new FlowLayoutWidget();
{
moveButtonFactory.Colors.Fill.Normal = XYZColors.xColor;
xButtons.HAnchor |= Agg.UI.HAnchor.Center;
xButtons.VAnchor |= Agg.UI.VAnchor.Center;
xButtons.HAnchor |= HAnchor.Center;
xButtons.VAnchor |= VAnchor.Center;
xMinusControl = CreateMoveButton(printer, "X-", PrinterConnection.Axis.X, printer.Settings.XSpeed(), false, moveButtonFactory);
xMinusControl.ToolTipText = "Move X negative".Localize();
xButtons.AddChild(xMinusControl);
GuiWidget spacer = new GuiWidget(xMinusControl.Width + buttonSeparationDistance * 2, 2);
spacer.VAnchor = Agg.UI.VAnchor.Center;
spacer.BackgroundColor = XYZColors.xColor;
xButtons.AddChild(spacer);
// spacer
xButtons.AddChild(new GuiWidget(xMinusControl.Width + buttonSeparationDistance * 2, 2)
{
VAnchor = VAnchor.Center,
BackgroundColor = XYZColors.xColor
});
xPlusControl = CreateMoveButton(printer, "X+", PrinterConnection.Axis.X, printer.Settings.XSpeed(), false, moveButtonFactory);
xPlusControl.ToolTipText = "Move X positive".Localize();
@ -605,16 +614,18 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget yButtons = new FlowLayoutWidget(FlowDirection.TopToBottom);
{
moveButtonFactory.Colors.Fill.Normal = XYZColors.yColor;
yButtons.HAnchor |= Agg.UI.HAnchor.Center;
yButtons.VAnchor |= Agg.UI.VAnchor.Center;
yButtons.HAnchor |= HAnchor.Center;
yButtons.VAnchor |= VAnchor.Center;
yPlusControl = CreateMoveButton(printer, "Y+", PrinterConnection.Axis.Y, printer.Settings.YSpeed(), false, moveButtonFactory);
yPlusControl.ToolTipText = "Move Y positive".Localize();
yButtons.AddChild(yPlusControl);
GuiWidget spacer = new GuiWidget(2, buttonSeparationDistance);
spacer.HAnchor = Agg.UI.HAnchor.Center;
spacer.BackgroundColor = XYZColors.yColor;
yButtons.AddChild(spacer);
// spacer
yButtons.AddChild(new GuiWidget(2, buttonSeparationDistance)
{
HAnchor = HAnchor.Center,
BackgroundColor = XYZColors.yColor
});
yMinusControl = CreateMoveButton(printer, "Y-", PrinterConnection.Axis.Y, printer.Settings.YSpeed(), false, moveButtonFactory);
yMinusControl.ToolTipText = "Move Y negative".Localize();
@ -624,7 +635,7 @@ namespace MatterHackers.MatterControl
}
xyGrid.HAnchor = HAnchor.Fit;
xyGrid.VAnchor = VAnchor.Fit;
xyGrid.VAnchor = Agg.UI.VAnchor.Bottom;
xyGrid.VAnchor = VAnchor.Bottom;
xyGrid.Margin = new BorderDouble(0, 5, distanceBetweenControls, 5);
return xyGrid;
}
@ -805,22 +816,22 @@ namespace MatterHackers.MatterControl
{
//Create the multi-state button view
var buttonViewStates = new ButtonViewStates(
new MoveButtonWidget(label, Colors.Text.Normal)
new MoveButtonWidget(label, Colors.Text.Normal, this.FontSize)
{
BackgroundColor = Colors.Fill.Normal,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Hover)
new MoveButtonWidget(label, Colors.Text.Hover, this.FontSize)
{
BackgroundColor = Colors.Fill.Hover,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Pressed)
new MoveButtonWidget(label, Colors.Text.Pressed, this.FontSize)
{
BackgroundColor = Colors.Fill.Pressed,
BorderWidth = this.BorderWidth
},
new MoveButtonWidget(label, Colors.Text.Disabled)
new MoveButtonWidget(label, Colors.Text.Disabled, this.FontSize)
{
BackgroundColor = Colors.Fill.Disabled,
BorderWidth = this.BorderWidth

View file

@ -35,7 +35,6 @@ using MatterHackers.Agg;
using MatterHackers.Agg.Platform;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.CustomWidgets;
using MatterHackers.VectorMath;
namespace MatterHackers.MatterControl.SlicerConfiguration
@ -46,6 +45,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
private string defaultMenuItemText = "- none -".Localize();
private Button editButton;
private NamedSettingsLayers layerType;
private ThemeConfig theme;
private PrinterConfig printer;
private GuiWidget pullDownContainer;
private EventHandler unregisterEvents;
@ -55,9 +55,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public PresetSelectorWidget(PrinterConfig printer, string label, Color accentColor, NamedSettingsLayers layerType, bool whiteBackground = false)
: base(FlowDirection.TopToBottom)
{
theme = ApplicationController.Instance.Theme;
this.printer = printer;
this.whiteBackground = whiteBackground;
Name = label;
this.Name = label;
ActiveSliceSettings.MaterialPresetChanged += ActiveSliceSettings_MaterialPresetChanged;
@ -75,7 +77,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
this.HAnchor = HAnchor.Stretch;
this.VAnchor = VAnchor.Fit;
this.BackgroundColor = ActiveTheme.Instance.TertiaryBackgroundColor;
this.BackgroundColor = theme.Colors.TertiaryBackgroundColor;
GuiWidget accentBar = new GuiWidget(7, 3)
{
@ -84,9 +86,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
};
// Section Label
this.AddChild(new TextWidget(label)
this.AddChild(new TextWidget(label, pointSize: theme.DefaultFontSize)
{
TextColor = whiteBackground ? Color.Black : ActiveTheme.Instance.PrimaryTextColor,
TextColor = whiteBackground ? Color.Black : theme.Colors.PrimaryTextColor,
HAnchor = HAnchor.Left,
Margin = new BorderDouble(12, 3, 0, 6)
});
@ -216,10 +218,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public override void OnClosed(ClosedEventArgs e)
{
ActiveSliceSettings.MaterialPresetChanged -= ActiveSliceSettings_MaterialPresetChanged;
if (unregisterEvents != null)
{
unregisterEvents(this, null);
}
unregisterEvents?.Invoke(this, null);
base.OnClosed(e);
}
@ -230,11 +230,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
private DropDownList CreateDropdown()
{
var dropDownList = new DropDownList(defaultMenuItemText, ActiveTheme.Instance.PrimaryTextColor, maxHeight: 300, useLeftIcons: true)
var dropDownList = new DropDownList(defaultMenuItemText, theme.Colors.PrimaryTextColor, maxHeight: 300, useLeftIcons: true, pointSize: theme.DefaultFontSize)
{
HAnchor = HAnchor.Stretch,
MenuItemsPadding = new BorderDouble(10, 7, 7, 7),
TextColor = whiteBackground ? Color.Black : ActiveTheme.Instance.PrimaryTextColor,
TextColor = whiteBackground ? Color.Black : theme.Colors.PrimaryTextColor,
};
dropDownList.Name = layerType.ToString() + " DropDown List";

View file

@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
Margin = new BorderDouble(top: 8),
VAnchor = VAnchor.Stretch,
HAnchor = HAnchor.Stretch,
MinimumSize = new Vector2(200, 200)
MinimumSize = new Vector2(200, 200),
};
primaryTabControl.TabBar.BackgroundColor = theme.ActiveTabBarBackground;
@ -130,7 +130,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
primaryTabControl,
content,
theme,
hasClose: false)
hasClose: false,
pointSize: theme.DefaultFontSize)
{
Name = category.Name + " Tab",
InactiveTabColor = Color.Transparent,
@ -310,7 +311,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
&& settingShouldBeShown)
{
topToBottomSettings.AddChild(
CreateItemRow(settingData, ref tabIndexForItem));
CreateItemRow(settingData, ref tabIndexForItem, theme));
topToBottomSettings.AddChild(new HorizontalLine(20)
{
@ -430,12 +431,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
return dataArea;
}
internal GuiWidget CreateItemRow(SliceSettingData settingData, ref int tabIndexForItem)
internal GuiWidget CreateItemRow(SliceSettingData settingData, ref int tabIndexForItem, ThemeConfig theme)
{
return CreateItemRow(settingData, settingsContext, printer, ActiveTheme.Instance.PrimaryTextColor, ref tabIndexForItem, allUiFields);
return CreateItemRow(settingData, settingsContext, printer, theme.Colors.PrimaryTextColor, theme, ref tabIndexForItem, allUiFields);
}
public static GuiWidget CreateItemRow(SliceSettingData settingData, SettingsContext settingsContext, PrinterConfig printer, Color textColor, ref int tabIndexForItem, Dictionary<string, UIField> fieldCache = null)
public static GuiWidget CreateItemRow(SliceSettingData settingData, SettingsContext settingsContext, PrinterConfig printer, Color textColor, ThemeConfig theme, ref int tabIndexForItem, Dictionary<string, UIField> fieldCache = null)
{
string sliceSettingValue = settingsContext.GetValue(settingData.SlicerConfigName);
@ -536,7 +537,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
sliceSettingValue = printer.Settings.Helpers.ComPort();
uiField = new ComPortField(printer);
uiField = new ComPortField(printer, theme);
uiField.ValueChanged += (s, e) =>
{
if (e.UserInitiated)
@ -698,10 +699,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public static GuiWidget CreateQuickMenu(SliceSettingData settingData, SettingsContext settingsContext, GuiWidget content, InternalTextEditWidget internalTextWidget)
{
var theme = ApplicationController.Instance.Theme;
string sliceSettingValue =settingsContext.GetValue(settingData.SlicerConfigName);
FlowLayoutWidget totalContent = new FlowLayoutWidget();
DropDownList selectableOptions = new DropDownList("Custom", ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200);
DropDownList selectableOptions = new DropDownList("Custom", theme.Colors.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize);
selectableOptions.Margin = new BorderDouble(0, 0, 10, 0);
foreach (QuickMenuNameValue nameValue in settingData.QuickMenuSettings)

View file

@ -39,11 +39,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public class ComPortField : UIField
{
private DropDownList dropdownList;
private ThemeConfig theme;
private PrinterConfig printer;
public ComPortField(PrinterConfig printer)
public ComPortField(PrinterConfig printer, ThemeConfig theme)
{
this.theme = theme;
this.printer = printer;
}
@ -59,7 +60,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
// bind to a context that will place it in the SliceSetting view but it binds its values to a machine
// specific dictionary key that is not exposed in the UI. At runtime we lookup and store to '<machinename>_com_port'
// ensuring that a single printer can be shared across different devices and we'll select the correct com port in each case
dropdownList = new DropDownList("None".Localize(), ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200)
dropdownList = new DropDownList("None".Localize(), ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize)
{
ToolTipText = this.HelpText,
Margin = new BorderDouble(),

View file

@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
var totalContent = new FlowLayoutWidget();
var selectableOptions = new DropDownList("Custom", textColor, maxHeight: 200);
var selectableOptions = new DropDownList("Custom", textColor, maxHeight: 200, pointSize: ApplicationController.Instance.Theme.DefaultFontSize);
selectableOptions.Margin = new BorderDouble(0, 0, 10, 0);
foreach (QuickMenuNameValue nameValue in settingData.QuickMenuSettings)

View file

@ -30,19 +30,21 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
EventHandler unregisterEvents = null;
var theme = ApplicationController.Instance.Theme;
base.Initialize(tabIndex);
bool canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
//This setting defaults to Manual
var selectedMachine = printer.Settings.GetValue(SettingsKey.selector_ip_address);
dropdownList = new DropDownList(selectedMachine, ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200)
dropdownList = new DropDownList(selectedMachine, theme.Colors.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize)
{
ToolTipText = HelpText,
Margin = new BorderDouble(),
TabIndex = tabIndex,
Enabled = canChangeComPort,
TextColor = canChangeComPort ? ActiveTheme.Instance.PrimaryTextColor : new Color(ActiveTheme.Instance.PrimaryTextColor, 150),
BorderColor = canChangeComPort ? ActiveTheme.Instance.SecondaryTextColor : new Color(ActiveTheme.Instance.SecondaryTextColor, 150),
TextColor = canChangeComPort ? theme.Colors.PrimaryTextColor : new Color(theme.Colors.PrimaryTextColor, 150),
BorderColor = canChangeComPort ? theme.Colors.SecondaryTextColor : new Color(theme.Colors.SecondaryTextColor, 150),
};
@ -60,8 +62,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
dropdownList.Enabled = canChangeComPort;
dropdownList.TextColor = canChangeComPort ? ActiveTheme.Instance.PrimaryTextColor : new Color(ActiveTheme.Instance.PrimaryTextColor, 150);
dropdownList.BorderColor = canChangeComPort ? ActiveTheme.Instance.SecondaryTextColor : new Color(ActiveTheme.Instance.SecondaryTextColor, 150);
dropdownList.TextColor = canChangeComPort ? theme.Colors.PrimaryTextColor : new Color(theme.Colors.PrimaryTextColor, 150);
dropdownList.BorderColor = canChangeComPort ? theme.Colors.SecondaryTextColor : new Color(theme.Colors.SecondaryTextColor, 150);
}, ref unregisterEvents);
// Release event listener on close

View file

@ -43,7 +43,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public override void Initialize(int tabIndex)
{
dropdownList = new DropDownList("None".Localize(), ActiveTheme.Instance.PrimaryTextColor, maxHeight: 200)
var theme = ApplicationController.Instance.Theme;
dropdownList = new DropDownList("None".Localize(), theme.Colors.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize)
{
ToolTipText = this.HelpText,
TabIndex = tabIndex,

@ -1 +1 @@
Subproject commit 20e512ecddb0612aa1ca9bbfe512a13401093f85
Subproject commit 62ffc915f217c8a2232810fb4f567f9b4b1009f3

View file

@ -277,7 +277,7 @@ namespace MatterControl.Tests.MatterControl
AggContext.StaticData = new FileSystemStaticData(TestContext.CurrentContext.ResolveProjectPath(4, "StaticData"));
MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));
var field = new ComPortField(new PrinterConfig(PrinterSettings.Empty));
var field = new ComPortField(new PrinterConfig(PrinterSettings.Empty), new ThemeConfig());
await ValidateAgainstValueMap(
field,

View file

@ -35,6 +35,7 @@
this.tabPage2 = new System.Windows.Forms.TabPage();
this.sceneTreeView = new System.Windows.Forms.TreeView();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.debugTextWidget = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -48,18 +49,19 @@
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.debugTextWidget);
this.splitContainer1.Panel1.Controls.Add(this.tabControl1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.propertyGrid1);
this.splitContainer1.Size = new System.Drawing.Size(831, 632);
this.splitContainer1.SplitterDistance = 554;
this.splitContainer1.Size = new System.Drawing.Size(913, 632);
this.splitContainer1.SplitterDistance = 608;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 0;
//
@ -71,7 +73,7 @@
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(554, 632);
this.tabControl1.Size = new System.Drawing.Size(608, 632);
this.tabControl1.TabIndex = 1;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
@ -80,8 +82,8 @@
this.tabPage1.Controls.Add(this.aggTreeView);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage1.Size = new System.Drawing.Size(546, 606);
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(600, 606);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "SystemWindow";
this.tabPage1.UseVisualStyleBackColor = true;
@ -93,9 +95,9 @@
this.aggTreeView.FullRowSelect = true;
this.aggTreeView.HideSelection = false;
this.aggTreeView.Location = new System.Drawing.Point(3, 3);
this.aggTreeView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.aggTreeView.Margin = new System.Windows.Forms.Padding(2);
this.aggTreeView.Name = "aggTreeView";
this.aggTreeView.Size = new System.Drawing.Size(540, 600);
this.aggTreeView.Size = new System.Drawing.Size(594, 600);
this.aggTreeView.TabIndex = 1;
this.aggTreeView.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.AggTreeView_DrawNode);
this.aggTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.AggTreeView_AfterSelect);
@ -105,8 +107,8 @@
this.tabPage2.Controls.Add(this.sceneTreeView);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage2.Size = new System.Drawing.Size(547, 606);
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(546, 606);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Scene";
this.tabPage2.UseVisualStyleBackColor = true;
@ -118,9 +120,9 @@
this.sceneTreeView.FullRowSelect = true;
this.sceneTreeView.HideSelection = false;
this.sceneTreeView.Location = new System.Drawing.Point(3, 3);
this.sceneTreeView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.sceneTreeView.Margin = new System.Windows.Forms.Padding(2);
this.sceneTreeView.Name = "sceneTreeView";
this.sceneTreeView.Size = new System.Drawing.Size(541, 600);
this.sceneTreeView.Size = new System.Drawing.Size(540, 600);
this.sceneTreeView.TabIndex = 2;
this.sceneTreeView.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.SceneTreeView_DrawNode);
this.sceneTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.SceneTreeView_AfterSelect);
@ -130,22 +132,35 @@
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid1.LineColor = System.Drawing.SystemColors.ControlDark;
this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(2);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(274, 632);
this.propertyGrid1.Size = new System.Drawing.Size(302, 632);
this.propertyGrid1.TabIndex = 0;
this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged);
//
// debugTextWidget
//
this.debugTextWidget.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.debugTextWidget.AutoSize = true;
this.debugTextWidget.Location = new System.Drawing.Point(489, 3);
this.debugTextWidget.Name = "debugTextWidget";
this.debugTextWidget.Size = new System.Drawing.Size(116, 17);
this.debugTextWidget.TabIndex = 2;
this.debugTextWidget.Text = "Debug TextWidget";
this.debugTextWidget.UseVisualStyleBackColor = true;
this.debugTextWidget.CheckedChanged += new System.EventHandler(this.debugTextWidget_CheckedChanged);
//
// InspectForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(831, 632);
this.ClientSize = new System.Drawing.Size(913, 632);
this.Controls.Add(this.splitContainer1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "InspectForm";
this.Text = "InspectForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
@ -165,5 +180,6 @@
private System.Windows.Forms.TreeView aggTreeView;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TreeView sceneTreeView;
private System.Windows.Forms.CheckBox debugTextWidget;
}
}

View file

@ -477,5 +477,17 @@ namespace MatterHackers.MatterControl
scene.DebugItem = null;
}
}
private void debugTextWidget_CheckedChanged(object sender, EventArgs e)
{
TextWidget.DebugShowSize = debugTextWidget.Checked;
foreach(var widget in this.inspectedSystemWindow.Descendants<TextWidget>())
{
widget.Invalidate();
}
}
}
}