Move theme image adjustment functionality into StaticData.LoadIcon

This commit is contained in:
John Lewin 2017-10-14 23:18:06 -07:00
parent dc4aa1d03a
commit 145ef1ad63
22 changed files with 69 additions and 274 deletions

View file

@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl.ActionBar
this.Margin = 0;
this.Padding = 0;
connectButton = theme.ButtonFactory.Generate("Connect".Localize().ToUpper(), AggContext.StaticData.LoadIcon("connect.png", 14, 14));
connectButton = theme.ButtonFactory.Generate("Connect".Localize().ToUpper(), AggContext.StaticData.LoadIcon("connect.png", 14, 14, IconColor.Theme));
connectButton.Name = "Connect to printer button";
connectButton.ToolTipText = "Connect to the currently selected printer".Localize();
connectButton.Click += (s, e) =>
@ -72,7 +72,7 @@ namespace MatterHackers.MatterControl.ActionBar
};
this.AddChild(connectButton);
disconnectButton = theme.ButtonFactory.Generate("Disconnect".Localize().ToUpper(), AggContext.StaticData.LoadIcon("connect.png", 14, 14));
disconnectButton = theme.ButtonFactory.Generate("Disconnect".Localize().ToUpper(), AggContext.StaticData.LoadIcon("connect.png", 14, 14, IconColor.Theme));
disconnectButton.Name = "Disconnect from printer button";
disconnectButton.Visible = false;
disconnectButton.ToolTipText = "Disconnect from current printer".Localize();