Revert accessibility of contentRow

- Add public PrinterSetupWizardPage proxy to private .contentRow
- Use PrinterSetupWizardPage.ContentRow in LoadFilamentWizard
This commit is contained in:
John Lewin 2018-11-03 10:12:27 -07:00
parent c79afc741a
commit b1053b8198
44 changed files with 136 additions and 135 deletions

View file

@ -59,10 +59,10 @@ namespace MatterHackers.MatterControl
VAnchor = VAnchor.Stretch,
};
scrollableWidget.ScrollArea.HAnchor = HAnchor.Stretch;
ContentRow.AddChild(scrollableWidget);
contentRow.AddChild(scrollableWidget);
// No right padding removes unexpected spacing to the right of scrollbar
ContentRow.Padding = ContentRow.Padding.Clone(right: 0);
contentRow.Padding = contentRow.Padding.Clone(right: 0);
var column = new FlowLayoutWidget(FlowDirection.TopToBottom)
{

View file

@ -55,28 +55,28 @@ namespace MatterHackers.MatterControl
var elementMargin = new BorderDouble(top: 3);
ContentRow.Padding += 3;
contentRow.Padding += 3;
ContentRow.AddChild(new TextWidget("Macro Name".Localize() + ":", 0, 0, 12)
contentRow.AddChild(new TextWidget("Macro Name".Localize() + ":", 0, 0, 12)
{
TextColor = theme.TextColor,
HAnchor = HAnchor.Stretch,
Margin = new BorderDouble(0, 0, 0, 1)
});
ContentRow.AddChild(macroNameInput = new MHTextEditWidget(GCodeMacro.FixMacroName(gcodeMacro.Name), theme)
contentRow.AddChild(macroNameInput = new MHTextEditWidget(GCodeMacro.FixMacroName(gcodeMacro.Name), theme)
{
HAnchor = HAnchor.Stretch
});
ContentRow.AddChild(macroNameError = new TextWidget("Give the macro a name".Localize() + ".", 0, 0, 10)
contentRow.AddChild(macroNameError = new TextWidget("Give the macro a name".Localize() + ".", 0, 0, 10)
{
TextColor = theme.TextColor,
HAnchor = HAnchor.Stretch,
Margin = elementMargin
});
ContentRow.AddChild(new TextWidget("Macro Commands".Localize() + ":", 0, 0, 12)
contentRow.AddChild(new TextWidget("Macro Commands".Localize() + ":", 0, 0, 12)
{
TextColor = theme.TextColor,
HAnchor = HAnchor.Stretch,
@ -90,9 +90,9 @@ namespace MatterHackers.MatterControl
};
macroCommandInput.ActualTextEditWidget.VAnchor = VAnchor.Stretch;
macroCommandInput.DrawFromHintedCache();
ContentRow.AddChild(macroCommandInput);
contentRow.AddChild(macroCommandInput);
ContentRow.AddChild(macroCommandError = new TextWidget("This should be in 'G-Code'".Localize() + ".", 0, 0, 10)
contentRow.AddChild(macroCommandError = new TextWidget("This should be in 'G-Code'".Localize() + ".", 0, 0, 10)
{
TextColor = theme.TextColor,
HAnchor = HAnchor.Stretch,
@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl
HAnchor = HAnchor.Stretch
};
ContentRow.AddChild(container);
contentRow.AddChild(container);
var saveMacroButton = theme.CreateDialogButton("Save".Localize());
saveMacroButton.Click += (s, e) =>

View file

@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl
private void RebuildList(PrinterSettings printerSettings)
{
this.ContentRow.CloseAllChildren();
this.contentRow.CloseAllChildren();
if (printerSettings?.Macros != null)
{
@ -111,7 +111,7 @@ namespace MatterHackers.MatterControl
};
macroRow.AddChild(removeLink);
ContentRow.AddChild(macroRow);
contentRow.AddChild(macroRow);
}
}
}

View file

@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl
headerBar.AddChild(new TextWidget(this.WindowTitle, textColor: theme.TextColor, pointSize: theme.FontSize10));
ContentRow.AddChild(headerBar);
contentRow.AddChild(headerBar);
// put in the movement edit controls
string[] settingsArray = printer.Settings.Helpers.GetMovementSpeedsString().Split(',');
@ -112,7 +112,7 @@ namespace MatterHackers.MatterControl
row.AddChild(valueEdit);
valueEditors.Add(valueEdit);
ContentRow.AddChild(row);
contentRow.AddChild(row);
preset_count += 1;
}

View file

@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
Margin = theme.DefaultContainerPadding
};
treeView.ScrollArea.HAnchor = HAnchor.Stretch;
ContentRow.AddChild(treeView);
contentRow.AddChild(treeView);
var nextButton = new TextButton(continueButtonText, theme)
{

View file

@ -55,7 +55,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
this.printer = printer;
printerBaudRateContainer = createPrinterBaudRateContainer();
ContentRow.AddChild(printerBaudRateContainer);
contentRow.AddChild(printerBaudRateContainer);
{
nextButton = theme.CreateDialogButton("Continue".Localize());
nextButton.Click += (s, e) =>

View file

@ -70,7 +70,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
this.printer = printer;
FlowLayoutWidget printerComPortContainer = createComPortContainer();
ContentRow.AddChild(printerComPortContainer);
contentRow.AddChild(printerComPortContainer);
//Construct buttons
nextButton = theme.CreateDialogButton("Done".Localize());

View file

@ -126,7 +126,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
});
container.AddChild(skipConnectionLink);
ContentRow.AddChild(container);
contentRow.AddChild(container);
//Construct buttons
var nextButton = theme.CreateDialogButton("Continue".Localize());

View file

@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
this.printer = printer;
startingPortNames = FrostedSerialPort.GetPortNames();
ContentRow.AddChild(createPrinterConnectionMessageContainer());
contentRow.AddChild(createPrinterConnectionMessageContainer());
//Construct buttons
nextButton = theme.CreateDialogButton("Done".Localize());

View file

@ -116,11 +116,11 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
if (userIsLoggedIn)
{
ContentRow.AddChild(addPrinterColumn);
contentRow.AddChild(addPrinterColumn);
}
else
{
ContentRow.Padding = 10;
contentRow.Padding = 10;
addPrinterColumn.Margin = new BorderDouble(28, 15, 15, 5);
var commonMargin = new BorderDouble(4, 2);
@ -133,7 +133,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
Cursor = Cursors.Hand,
Name = "Sign In Radio Button",
};
ContentRow.AddChild(signInRadioButton);
contentRow.AddChild(signInRadioButton);
createPrinterRadioButton = new RadioButton(new RadioButtonViewText("Create a new printer", theme.TextColor))
{
@ -143,7 +143,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
Name = "Create Printer Radio Button",
Checked = true
};
ContentRow.AddChild(createPrinterRadioButton);
contentRow.AddChild(createPrinterRadioButton);
createPrinterRadioButton.CheckedStateChanged += (s, e) =>
{
@ -151,7 +151,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
this.SetElementVisibility();
};
ContentRow.AddChild(addPrinterColumn);
contentRow.AddChild(addPrinterColumn);
}
nextButton = theme.CreateDialogButton("Next".Localize());
@ -302,7 +302,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
printerModelSelector.SelectedIndex = 0;
}
ContentRow.Invalidate();
contentRow.Invalidate();
SetElementVisibility();
}