Skip to content

Commit 4c6afc1

Browse files
author
恩情
committed
Micro Improvements
1 parent 912402b commit 4c6afc1

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Me.EarzuChan.Ryo.ConsoleSystem/ConsoleSystem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public void Run()
4444
public void ParseCommand(string input) => ParseCommand(ConsoleUtils.ParseCommandLineArguments(input));
4545

4646
// 解析命令并执行相关操作
47+
// TODO:要支持可选参数
4748
public void ParseCommand(params string[] args)
4849
{
4950
Context.PrintLine();

Me.EarzuChan.Ryo.Kurisu/WindowManagers/WindowManagers.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private void OnStateChanged(object? _, EventArgs __)
4747
if (App!.Profile.WindowBorderless) WebView.Margin = Margin0;
4848
break;
4949
default:
50-
// if (App!.Profile.WindowBorderless) WebView.Margin = Margin4;
50+
if (App!.Profile.WindowBorderless) WebView.Margin = Margin4;
5151
break;
5252
}
5353

@@ -102,11 +102,12 @@ public void Init(KurisuApp app)
102102
{
103103
App = app;
104104

105-
// TODO:不要再使用系统边框,先搞透明窗口,接着Webview留出边距,然后H5自绘边框
105+
//不再使用系统边框,先搞透明窗口,接着Webview留出边距,然后H5自绘边框
106106

107107
WpfWindow.Title = app.Profile.Name;
108108
WpfWindow.Width = app.Profile.WindowWidth;
109109
WpfWindow.Height = app.Profile.WindowHeight;
110+
110111
if (app.Profile.UseIcon)
111112
WpfWindow.Icon = new BitmapImage(new Uri(app.Profile.Icon, UriKind.RelativeOrAbsolute));
112113

@@ -116,17 +117,15 @@ public void Init(KurisuApp app)
116117
it.Source = new Uri(app.Profile is { IsDebug: true, DebugStartUpWithDebugUrl: true }
117118
? app.Profile.DebugStartUpUrl
118119
: app.Profile.StartUpUrl);
119-
120-
// 设置Webview背景透明
121-
if (app.Profile.WindowBorderless) it.DefaultBackgroundColor = DrawingColor.Transparent;
122120
}
123121
);
124122

125123
//
126124
if (app.Profile.WindowBorderless)
127125
{
128-
// 处理WebView
129-
// WebView.Margin = Margin4;
126+
// 设置Webview背景透明与边距
127+
WebView.DefaultBackgroundColor = DrawingColor.Transparent;
128+
WebView.Margin = Margin4;
130129

131130
// 设置窗口背景为透明
132131
WpfWindow.AllowsTransparency = true;

0 commit comments

Comments
 (0)