Skip to content

Commit

Permalink
Make sure to update the maximize button's visual state on launch (#5988)
Browse files Browse the repository at this point in the history
## 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 #3440
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

(cherry picked from commit 2af722b)
  • Loading branch information
zadjii-msft authored and DHowett committed Jun 24, 2020
1 parent c6fc68e commit b592d5b
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 b592d5b

Please sign in to comment.