Skip to content

Commit 9e930de

Browse files
committed
enhance: reduce the times to call AdjustTrafficLightsForThickTitleBar on macOS
Signed-off-by: leo <longshuang@msn.cn>
1 parent 0271781 commit 9e930de

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Views/Launcher.axaml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
122122
}
123123

124124
if (HasLeftCaptionButton && OperatingSystem.IsMacOS())
125-
Native.MacOSUtilities.AdjustTrafficLightsForThickTitleBar(this);
125+
{
126+
if (change.Property == WindowStateProperty ||
127+
change.Property == BoundsProperty ||
128+
change.Property == TitleProperty)
129+
Native.MacOSUtilities.AdjustTrafficLightsForThickTitleBar(this);
130+
}
126131
}
127132

128133
protected override void OnSizeChanged(SizeChangedEventArgs e)

0 commit comments

Comments
 (0)