Skip to content

Commit

Permalink
Make sure to update the maximize button's visual state on launch (mic…
Browse files Browse the repository at this point in the history
…rosoft#5988)

## Summary of the Pull Request
This is an enormously trivial nit - when we launch maximized, we don't draw the maximize button in the "restore" state.

This PR changes the terminal to manually update the Maximize button on launch, once the titlebar is added to the UI tree.

## PR Checklist
* [x] Closes microsoft#3440
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated
  • Loading branch information
zadjii-msft authored and jelster committed May 28, 2020
1 parent 95fddd6 commit 6a135ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ void NonClientIslandWindow::Initialize()
_rootGrid.Children().Append(_titlebar);

Controls::Grid::SetRow(_titlebar, 0);

// GH#3440 - When the titlebar is loaded (officially added to our UI tree),
// then make sure to update it's visual state to reflect if we're in the
// maximized state on launch.
_titlebar.Loaded([this](auto&&, auto&&) { _OnMaximizeChange(); });
}

// Method Description:
Expand Down

0 comments on commit 6a135ab

Please sign in to comment.