Skip to content

Commit

Permalink
chore: 优化注释
Browse files Browse the repository at this point in the history
  • Loading branch information
Blinue committed Dec 26, 2024
1 parent 1f82b73 commit f495e66
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Magpie/XamlWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ class XamlWindowT : public WindowBaseT<T> {
return _isMaximized;
}

// 窗口尚未显示无法最大化,通过这个方法设置 _isMaximized 使 _UpdateIslandPosition 估计
// XAML Islands 窗口尺寸。否则在显示窗口时可能会看到 NavigationView 的导航栏的展开动画。
void _SetInitialMaximized(bool value) noexcept {
_isInitialMaximized = value;
}

void _SetTheme(bool isLightTheme) noexcept {
_isLightTheme = isLightTheme;

Expand Down Expand Up @@ -424,6 +418,11 @@ class XamlWindowT : public WindowBaseT<T> {
GetSystemMetricsForDpi(SM_CYSIZEFRAME, _currentDpi);
}

// 以最大化显示时使 XAML Islands 窗口尺寸保持稳定,见 _UpdateIslandPosition
void _SetInitialMaximized(bool value) noexcept {
_isInitialMaximized = value;
}

private:
void _UpdateIslandPosition(int width, int height) const noexcept {
// 当窗口以最大化显示时,为了修正动画,实际上是先窗口化显示然后改为最大化。这个过程中此函数
Expand Down

0 comments on commit f495e66

Please sign in to comment.