fix: minimize window button not work on Windows 10 (#501)
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

This commit is contained in:
leo 2024-09-23 14:44:23 +08:00
parent f77e06cc61
commit 983607e708
No known key found for this signature in database

View file

@ -201,9 +201,9 @@ namespace SourceGit.Native
private void FixWindowFrameOnWin10(Window w)
{
if (w.WindowState != WindowState.Normal)
if (w.WindowState == WindowState.Maximized || w.WindowState == WindowState.FullScreen)
w.SystemDecorations = SystemDecorations.Full;
else
else if (w.WindowState == WindowState.Normal)
w.SystemDecorations = SystemDecorations.BorderOnly;
}