Skip to content

Commit

Permalink
Add a zoom icon too
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jul 20, 2020
1 parent c626b5a commit dd11cf8
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions src/cascadia/TerminalApp/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,27 @@ namespace winrt::TerminalApp::implementation

if (!_inRename)
{
// If we're not currently in the process of renaming the tab, then just set the tab's text to whatever our active title is.
_tabViewItem.Header(winrt::box_value(tabText));
if (_zoomedPane)
{
Controls::StackPanel sp;
sp.Orientation(Controls::Orientation::Horizontal);
Controls::FontIcon ico;
ico.FontFamily(Media::FontFamily{ L"Segoe MDL2 Assets" });
ico.Glyph(L"\xE8A3");
ico.FontSize(12);
ico.Margin(ThicknessHelper::FromLengths(0, 0, 8, 0));
sp.Children().Append(ico);
Controls::TextBlock tb;
tb.Text(tabText);
sp.Children().Append(tb);

_tabViewItem.Header(sp);
}
else
{
// If we're not currently in the process of renaming the tab, then just set the tab's text to whatever our active title is.
_tabViewItem.Header(winrt::box_value(tabText));
}
}
else
{
Expand Down Expand Up @@ -897,25 +916,19 @@ namespace winrt::TerminalApp::implementation
{
EnterZoom();
}
// if (_focused)
// {
// auto lastFocusedControl = GetActiveTerminalControl();
// if (lastFocusedControl)
// {
// lastFocusedControl.Focus(FocusState::Programmatic);
// }
// }
}

void Tab::EnterZoom()
{
_zoomedPane = _activePane;
_rootPane->Zoom(_zoomedPane);
_UpdateTabHeader();
}
void Tab::ExitZoom()
{
_rootPane->UnZoom(_zoomedPane);
_zoomedPane = nullptr;
_UpdateTabHeader();
}

bool Tab::IsZoomed()
Expand Down

1 comment on commit dd11cf8

@github-actions

This comment was marked as resolved.

Please sign in to comment.