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

@ -104,7 +104,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
private GuiWidget CreatePinButton()
{
var icon = AggContext.StaticData.LoadIcon(this.ControlIsPinned ? "Pushpin_16x.png" : "PushpinUnpin_16x.png", 16, 16);
string imageFile = this.ControlIsPinned ? "Pushpin_16x.png" : "PushpinUnpin_16x.png";
var icon = AggContext.StaticData.LoadIcon(imageFile, 16, 16, IconColor.Theme);
var imageWidget = ApplicationController.Instance.Theme.ButtonFactory.GenerateIconButton(icon);
imageWidget.Name = "Pin Settings Button";

View file

@ -75,7 +75,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
var theme = ApplicationController.Instance.Theme;
var upbutton = theme.ButtonFactory.GenerateIconButton(AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "up_folder_20.png")));
var upbutton = theme.ButtonFactory.GenerateIconButton(AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "up_folder_20.png"), IconColor.Theme));
upbutton.Name = "Library Up Button";
upbutton.Margin = new BorderDouble(right: 2);
upbutton.Click += (s, e) =>