Move theme image adjustment functionality into StaticData.LoadIcon
This commit is contained in:
parent
dc4aa1d03a
commit
145ef1ad63
22 changed files with 69 additions and 274 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue