mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
code_style: move platform dependent code to initialize window to namespace SourceGit.Native
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
c62b4a031f
commit
ef4b639f8e
9 changed files with 41 additions and 68 deletions
|
@ -6,6 +6,7 @@ using System.Runtime.Versioning;
|
|||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Platform;
|
||||
|
||||
namespace SourceGit.Native
|
||||
{
|
||||
|
@ -19,7 +20,17 @@ namespace SourceGit.Native
|
|||
|
||||
public void SetupWindow(Window window)
|
||||
{
|
||||
// Do Nothing.
|
||||
if (OS.UseSystemWindowFrame)
|
||||
{
|
||||
window.ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.Default;
|
||||
window.ExtendClientAreaToDecorationsHint = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
||||
window.ExtendClientAreaToDecorationsHint = true;
|
||||
window.Classes.Add("custom_window_frame");
|
||||
}
|
||||
}
|
||||
|
||||
public string FindGitExecutable()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue