Put all the icons into the icons directory
Lots of work on printing from SD card Put in hardware options to describe printer settings (fan, heated bed, sd card) moved icons into subdirectory.
This commit is contained in:
parent
1db346d024
commit
e8247a8481
73 changed files with 261 additions and 144 deletions
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
hoverBackgroundColor = new RGBA_Bytes(100, 100, 100);
|
||||
|
||||
Agg.Image.ImageBuffer arrowImage = new Agg.Image.ImageBuffer();
|
||||
ImageIO.LoadImageData(Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "icon_arrow_left_16x16.png"), arrowImage);
|
||||
ImageIO.LoadImageData(Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "Icons", "icon_arrow_left_16x16.png"), arrowImage);
|
||||
arrowIndicator = new ImageWidget(arrowImage);
|
||||
arrowIndicator.HAnchor = Agg.UI.HAnchor.ParentCenter;
|
||||
arrowIndicator.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ using MatterHackers.Agg.UI;
|
|||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.PolygonMesh.Processors;
|
||||
|
|
@ -170,6 +171,38 @@ namespace MatterHackers.MatterControl
|
|||
thumbnailWidget.Invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
if (thumbnailWidget.PrintItem.FileLocation == QueueData.SdCardFileName)
|
||||
{
|
||||
switch (thumbnailWidget.Size)
|
||||
{
|
||||
case ImageSizes.Size115x115:
|
||||
{
|
||||
ImageIO.LoadImageData(this.GetImageLocation("icon_sd_card_115x115.png"), thumbnailWidget.tumbnailImage);
|
||||
thumbnailWidget.tumbnailImage.SetRecieveBlender(new BlenderPreMultBGRA());
|
||||
Graphics2D graphics = thumbnailWidget.tumbnailImage.NewGraphics2D();
|
||||
Ellipse outline = new Ellipse(new Vector2(115 / 2.0, 115 / 2.0), 50);
|
||||
graphics.Render(new Stroke(outline, 4), RGBA_Bytes.White);
|
||||
}
|
||||
break;
|
||||
|
||||
case ImageSizes.Size50x50:
|
||||
{
|
||||
ImageIO.LoadImageData(this.GetImageLocation("icon_sd_card_50x50.png"), thumbnailWidget.tumbnailImage);
|
||||
thumbnailWidget.tumbnailImage.SetRecieveBlender(new BlenderPreMultBGRA());
|
||||
Graphics2D graphics = thumbnailWidget.tumbnailImage.NewGraphics2D();
|
||||
Ellipse outline = new Ellipse(new Vector2(50 / 2.0, 50 / 2.0), 22);
|
||||
graphics.Render(new Stroke(outline, 1.5), RGBA_Bytes.White);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
UiThread.RunOnIdle(thumbnailWidget.EnsureImageUpdated);
|
||||
return;
|
||||
}
|
||||
|
||||
string stlHashCode = thumbnailWidget.PrintItem.StlFileHashCode.ToString();
|
||||
|
||||
|
|
@ -403,7 +436,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
string GetImageLocation(string imageName)
|
||||
{
|
||||
return Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, imageName);
|
||||
return Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "Icons", imageName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace MatterHackers.MatterControl.CreatorPlugins
|
|||
|
||||
ImageBuffer LoadImage(string imageName)
|
||||
{
|
||||
string path = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, imageName);
|
||||
string path = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "Icons", imageName);
|
||||
ImageBuffer buffer = new ImageBuffer(10, 10, 32, new BlenderBGRA());
|
||||
ImageIO.LoadImageData(path, buffer);
|
||||
return buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue