mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 16:40:26 +02:00
Generate theme images in 'cache' directory, allow PNG source images
This commit is contained in:
parent
f66b91931b
commit
1f0d2dcc82
4 changed files with 90 additions and 62 deletions
|
@ -491,20 +491,24 @@ namespace IDE
|
|||
for (int scale < 3)
|
||||
{
|
||||
String srcImgPath = scope .(absPath);
|
||||
String srcImgPath2 = scope .(absPath);
|
||||
String destImgPath = scope .(absPath);
|
||||
switch (scale)
|
||||
{
|
||||
case 0:
|
||||
srcImgPath.Append("UI.psd");
|
||||
destImgPath.Append("UI.png");
|
||||
srcImgPath2.Append("UI.png");
|
||||
destImgPath.Append("cache/UI.png");
|
||||
case 1:
|
||||
srcImgPath.Append("UI_2.psd");
|
||||
destImgPath.Append("UI_2.png");
|
||||
srcImgPath2.Append("UI_2.png");
|
||||
destImgPath.Append("cache/UI_2.png");
|
||||
case 2:
|
||||
srcImgPath.Append("UI_4.psd");
|
||||
destImgPath.Append("UI_2.png");
|
||||
srcImgPath2.Append("UI_2.png");
|
||||
destImgPath.Append("cache/UI_2.png");
|
||||
}
|
||||
maxSrcImgTime = Math.Max(maxSrcImgTime, File.GetLastWriteTime(srcImgPath).GetValueOrDefault());
|
||||
maxSrcImgTime = Math.Max(maxSrcImgTime, Math.Max(File.GetLastWriteTime(srcImgPath).GetValueOrDefault(), File.GetLastWriteTime(srcImgPath2).GetValueOrDefault()));
|
||||
let destImageTime = File.GetLastWriteTime(destImgPath).GetValueOrDefault();
|
||||
if (scale == 0)
|
||||
minDestImgTime = destImageTime;
|
||||
|
@ -543,9 +547,9 @@ namespace IDE
|
|||
String imgPath = scope .(absPath);
|
||||
switch (scale)
|
||||
{
|
||||
case 0: imgPath.Append("UI.png");
|
||||
case 1: imgPath.Append("UI_2.png");
|
||||
case 2: imgPath.Append("UI_4.png");
|
||||
case 0: imgPath.Append("cache/UI.png");
|
||||
case 1: imgPath.Append("cache/UI_2.png");
|
||||
case 2: imgPath.Append("cache/UI_4.png");
|
||||
}
|
||||
|
||||
if (File.Exists(imgPath))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue