Restore icon for Add menu item, improve icon support in MenuItem
- Render non-enabled menu icons with new lazy DisabledImage property - Move SettingsRow into CustomWidgets namespace
This commit is contained in:
parent
13c10644bc
commit
9c00f026c0
7 changed files with 27 additions and 6 deletions
|
|
@ -29,6 +29,7 @@ either expressed or implied, of the FreeBSD Project.
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.Library;
|
||||
|
|
@ -44,6 +45,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
|
||||
public Func<IEnumerable<ListViewItem>, ListView, bool> IsEnabled { get; set; }
|
||||
public string ToolTipText { get; internal set; }
|
||||
public ImageBuffer Icon { get; internal set; }
|
||||
internal PopupMenu.MenuItem MenuItem { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -451,12 +451,13 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
{
|
||||
menuActions.Add(new PrintItemAction()
|
||||
{
|
||||
Icon = AggContext.StaticData.LoadIcon("cube.png", IconColor.Raw),
|
||||
Title = "Add".Localize(),
|
||||
ToolTipText = "Add an.stl, .obj, .amf, .gcode or.zip file to the Library".Localize(),
|
||||
Action = (selectedLibraryItems, listView) =>
|
||||
{
|
||||
/*
|
||||
AggContext.StaticData.LoadIcon("cube.png", IconColor.Theme)
|
||||
|
||||
Name = "Library Add Button";
|
||||
*/
|
||||
|
||||
|
|
@ -481,6 +482,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
menuActions.Add(new PrintItemAction()
|
||||
{
|
||||
Title = "Create Folder".Localize(),
|
||||
Icon = AggContext.StaticData.LoadIcon("fa-folder-new_16.png", IconColor.Raw),
|
||||
Action = (selectedLibraryItems, listView) =>
|
||||
{
|
||||
/*
|
||||
|
|
@ -943,7 +945,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
}
|
||||
else
|
||||
{
|
||||
var menuItem = popupMenu.CreateMenuItem(menuAction.Title);
|
||||
var menuItem = popupMenu.CreateMenuItem(menuAction.Title, menuAction.Icon);
|
||||
menuItem.Name = $"{menuAction.Title} Menu Item";
|
||||
|
||||
menuItem.Enabled = menuAction.Action != null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue