Remove redundant helper method
This commit is contained in:
parent
8111ac9c9f
commit
494c2b6d82
6 changed files with 18 additions and 20 deletions
|
|
@ -150,7 +150,7 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
public ImageBuffer DefaultImage => LibraryProviderHelpers.LoadInvertIcon("mesh.png");
|
||||
public ImageBuffer DefaultImage => AggContext.StaticData.LoadIcon("mesh.png");
|
||||
|
||||
private static bool MeshIsTooBigToLoad(string fileLocation)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@ namespace MatterHackers.MatterControl.Library
|
|||
{
|
||||
public static class LibraryProviderHelpers
|
||||
{
|
||||
|
||||
public static ImageBuffer LoadInvertIcon(params string[] pathSegments)
|
||||
{
|
||||
return AggContext.StaticData.LoadIcon(Path.Combine(pathSegments)); //.InvertLightness();
|
||||
}
|
||||
|
||||
public static void RenderCentered(this Graphics2D graphics2D, ImageBuffer imageBuffer, double width, double height)
|
||||
{
|
||||
int targetWidth = graphics2D.DestImage.Width;
|
||||
|
|
|
|||
|
|
@ -29,10 +29,12 @@ either expressed or implied, of the FreeBSD Project.
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.Platform;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
|
||||
|
|
@ -78,7 +80,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
public override Task<ImageBuffer> GetThumbnail(ILibraryItem item, int width, int height)
|
||||
{
|
||||
bool largeIcon = width > 50 || height > 50;
|
||||
var thumbnail = LibraryProviderHelpers.LoadInvertIcon(largeIcon ? "icon_sd_card_115x115.png" : "icon_sd_card_50x50.png");
|
||||
var thumbnail = AggContext.StaticData.LoadIcon(Path.Combine(largeIcon ? "icon_sd_card_115x115.png" : "icon_sd_card_50x50.png"));
|
||||
|
||||
return Task.FromResult(thumbnail);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.Platform;
|
||||
|
||||
namespace MatterHackers.MatterControl.Library
|
||||
{
|
||||
|
|
@ -41,7 +42,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
|
||||
static LocalZipContainerLink()
|
||||
{
|
||||
thumbnail = LibraryProviderHelpers.LoadInvertIcon("FileDialog", "folder_zip.png");
|
||||
thumbnail = AggContext.StaticData.LoadIcon(System.IO.Path.Combine("FileDialog", "folder_zip.png"));
|
||||
}
|
||||
|
||||
public bool IsReadOnly { get; } = false;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ using System.IO;
|
|||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.Platform;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.MatterControl.Library;
|
||||
|
|
@ -42,9 +43,9 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
public class ListViewItemBase : GuiWidget
|
||||
{
|
||||
private static ImageBuffer defaultFolderIcon = LibraryProviderHelpers.LoadInvertIcon("FileDialog", "folder.png");
|
||||
private static ImageBuffer defaultItemIcon = LibraryProviderHelpers.LoadInvertIcon("FileDialog", "file.png");
|
||||
private static ImageBuffer generatingThumbnailIcon = LibraryProviderHelpers.LoadInvertIcon("building_thumbnail_40x40.png");
|
||||
private static ImageBuffer defaultFolderIcon = AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "folder.png"));
|
||||
private static ImageBuffer defaultItemIcon = AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "file.png"));
|
||||
private static ImageBuffer generatingThumbnailIcon = AggContext.StaticData.LoadIcon(Path.Combine("building_thumbnail_40x40.png"));
|
||||
|
||||
protected ListViewItem listViewItem;
|
||||
protected View3DWidget view3DWidget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue