Use caller specified margin

This commit is contained in:
John Lewin 2017-08-07 07:12:59 -07:00
parent d931b96752
commit 0e1df32143
3 changed files with 6 additions and 6 deletions

View file

@ -229,10 +229,12 @@ namespace MatterHackers.MatterControl.ActionBar
private EventHandler unregisterEvents;
public PrinterConnectButton(TextImageButtonFactory buttonFactory)
public PrinterConnectButton(TextImageButtonFactory buttonFactory, BorderDouble margin)
{
this.HAnchor = HAnchor.ParentLeft | HAnchor.FitToChildren;
this.VAnchor = VAnchor.FitToChildren;
this.Margin = 0;
this.Padding = 0;
connectButton = buttonFactory.Generate("Connect".Localize().ToUpper(), StaticData.Instance.LoadIcon("connect.png", 16, 16));
connectButton.Name = "Connect to printer button";
@ -284,6 +286,7 @@ namespace MatterHackers.MatterControl.ActionBar
child.VAnchor = VAnchor.ParentTop;
child.HAnchor = HAnchor.ParentLeft;
child.Cursor = Cursors.Hand;
child.Margin = margin;
}
// Bind connect button states to active printer state