add:自定义浮动栏图标

This commit is contained in:
2025-07-15 20:30:10 +08:00
parent 2c2f46a0d8
commit e687c78ba8
9 changed files with 374 additions and 44 deletions
+21
View File
@@ -1,5 +1,6 @@
using Newtonsoft.Json;
using System.IO;
using System.Collections.Generic;
namespace Ink_Canvas
{
@@ -139,6 +140,8 @@ namespace Ink_Canvas
public double ViewboxFloatingBarScaleTransformValue { get; set; } = 1.0;
[JsonProperty("floatingBarImg")]
public int FloatingBarImg { get; set; } = 0;
[JsonProperty("customFloatingBarImgs")]
public List<CustomFloatingBarIcon> CustomFloatingBarImgs { get; set; } = new List<CustomFloatingBarIcon>();
[JsonProperty("viewboxFloatingBarOpacityValue")]
public double ViewboxFloatingBarOpacityValue { get; set; } = 1.0;
[JsonProperty("enableTrayIcon")]
@@ -438,4 +441,22 @@ namespace Ink_Canvas
[JsonProperty("directCallCiRand")]
public bool DirectCallCiRand { get; set; } = false;
}
public class CustomFloatingBarIcon
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("filePath")]
public string FilePath { get; set; }
public CustomFloatingBarIcon(string name, string filePath)
{
Name = name;
FilePath = filePath;
}
// 用于JSON序列化
public CustomFloatingBarIcon() { }
}
}