fix the tests

This commit is contained in:
Mike Griese 2021-11-11 12:52:08 -06:00
parent 7bb8975953
commit efdc0909e8
3 changed files with 7 additions and 3 deletions

View file

@ -40,9 +40,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
CONTROL_APPEARANCE_SETTINGS(COPY_SETTING)
#undef COPY_SETTING
for (int32_t i = 0; i < _ColorTable.size(); i++)
for (size_t i = 0; i < _ColorTable.size(); i++)
{
_ColorTable[i] = appearance.GetColorTableEntry(i);
_ColorTable[i] = appearance.GetColorTableEntry(static_cast<int32_t>(i));
}
}
};

View file

@ -456,7 +456,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// Update the renderer as well. It might need to fall back from
// cleartype -> grayscale if the BG is transparent / acrylic.
_renderEngine->EnableTransparentBackground(_isBackgroundTransparent());
if (_renderEngine)
{
_renderEngine->EnableTransparentBackground(_isBackgroundTransparent());
}
auto eventArgs = winrt::make_self<TransparencyChangedEventArgs>(newOpacity);
_TransparencyChangedHandlers(*this, *eventArgs);

View file

@ -111,6 +111,7 @@ namespace ControlUnitTests
settings->Opacity(0.5f);
auto [core, interactivity] = _createCoreAndInteractivity(*settings, *conn);
auto controlSettings = core->_settings;
// A callback to make sure that we're raising TransparencyChanged events
double expectedOpacity = 0.5;