Skip to content

Commit c4bcc5e

Browse files
committed
code_style: more readable code
Signed-off-by: leo <longshuang@msn.cn>
1 parent f572366 commit c4bcc5e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Views/Launcher.axaml.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public Launcher()
4747
{
4848
HasLeftCaptionButton = true;
4949
CaptionHeight = new GridLength(34);
50-
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
50+
ExtendClientAreaChromeHints |= ExtendClientAreaChromeHints.OSXThickTitleBar;
5151
}
5252
else if (UseSystemWindowFrame)
5353
{
@@ -109,14 +109,13 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
109109

110110
if (change.Property == WindowStateProperty)
111111
{
112-
_lastWindowState = (WindowState)change.OldValue!;
113-
114112
var state = (WindowState)change.NewValue!;
115-
if (!OperatingSystem.IsMacOS() && !UseSystemWindowFrame)
116-
CaptionHeight = new GridLength(state == WindowState.Maximized ? 30 : 38);
113+
_lastWindowState = (WindowState)change.OldValue!;
117114

118115
if (OperatingSystem.IsMacOS())
119116
HasLeftCaptionButton = state != WindowState.FullScreen;
117+
else if (!UseSystemWindowFrame)
118+
CaptionHeight = new GridLength(state == WindowState.Maximized ? 30 : 38);
120119

121120
ViewModels.Preferences.Instance.Layout.LauncherWindowState = state;
122121
}

0 commit comments

Comments
 (0)