TextBox improvements, CommandPalette

This commit is contained in:
2023-08-13 13:38:30 +02:00
parent a594e1b989
commit 6797c26bf9
4 changed files with 78 additions and 10 deletions

View File

@@ -151,7 +151,22 @@ public abstract partial class View<T> : IView<T>
);
}
var renderResult = RenderMethod(renderContext, position, size);
bool renderResult;
if (Background != null || Foreground != null)
{
var newRenderContext = new RenderContext(
renderContext.ConsoleDriver,
renderContext.ForceRerender,
Foreground ?? renderContext.Foreground,
Background ?? renderContext.Background,
renderContext.Statistics);
renderResult = RenderMethod(newRenderContext, position, size);
}
else
{
renderResult = RenderMethod(renderContext, position, size);
}
if (renderResult)
{
renderContext.Statistics.RenderedViews++;