Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pull Request] 修复了拖动调色板滑块造成的意外错误 #64

Merged
merged 2 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion KitX Dashboard/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public static void SaveConfig()

new Thread(() =>
{

BasicHelper.IO.FileHelper.WriteIn(ConfigFilePath,
JsonSerializer.Serialize(Program.GlobalConfig, options));
}).Start();
Expand Down Expand Up @@ -196,7 +197,7 @@ public static void InitEnvironment()
{
#region 检查 Catrol.Algorithm 库环境并安装环境
if (!Algorithm.Interop.Environment.CheckEnvironment())
new System.Threading.Thread(() =>
new Thread(() =>
{
Algorithm.Interop.Environment.InstallEnvironment();
}).Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ private void InitCommands()
internal Color2 ThemeColor
{
get => new((Application.Current.Resources["ThemePrimaryAccent"] as SolidColorBrush).Color);
set
{
nowColor = value;
SaveChanges();
}
set => nowColor = value;
}

/// <summary>
Expand Down Expand Up @@ -303,6 +299,7 @@ private void ColorConfirmed(object _)
var c = nowColor;
Application.Current.Resources["ThemePrimaryAccent"] =
new SolidColorBrush(new Color(c.A, c.R, c.G, c.B));
SaveChanges();
}

private void MicaOpacityConfirmed(object _) => SaveChanges();
Expand Down