Fixed duplicate line in TermControl (#732) (#739)

* Fixed duplicate line in TermControl #732

* Deleted lines, because values were unnecessarily set to default values.
This commit is contained in:
Mario Kneidinger 2019-05-13 18:11:31 +02:00 committed by Dustin L. Howett (MSFT)
parent 9ba3a53b4b
commit aeef340bdc

View file

@ -75,11 +75,6 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
// Create the SwapChainPanel that will display our content
Controls::SwapChainPanel swapChainPanel;
swapChainPanel.SetValue(FrameworkElement::HorizontalAlignmentProperty(),
box_value(HorizontalAlignment::Stretch));
swapChainPanel.SetValue(FrameworkElement::HorizontalAlignmentProperty(),
box_value(HorizontalAlignment::Stretch));
swapChainPanel.SizeChanged({ this, &TermControl::_SwapChainSizeChanged });
swapChainPanel.CompositionScaleChanged({ this, &TermControl::_SwapChainScaleChanged });
@ -375,7 +370,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
// In the scenario where the user has turned off the OS setting to automatically hide scollbars, the
// Terminal scrollbar would still be visible; so, we need to set the control's visibility accordingly to
// achieve the intended effect.
_scrollBar.Visibility(Visibility::Collapsed);
_scrollBar.Visibility(Visibility::Collapsed);
}
else
{
@ -1041,12 +1036,12 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
float width = gsl::narrow<float>(cols * fFontWidth);
// Reserve additional space if scrollbar is intended to be visible
if (settings.ScrollState() == ScrollbarState::Visible)
{
width += scrollbarSize;
}
if (settings.ScrollState() == ScrollbarState::Visible)
{
width += scrollbarSize;
}
const float height = gsl::narrow<float>(rows * fFontHeight);
const float height = gsl::narrow<float>(rows * fFontHeight);
return { width, height };
}