Skip to content

Commit

Permalink
Fix background color.
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Mar 5, 2024
1 parent 650cda1 commit 8e8b42c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/EFCore.Visualizer/QueryPlanUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected override async void OnInitialized(EventArgs e)
webView.CoreWebView2.Settings.AreBrowserAcceleratorKeysEnabled = false;
webView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false;
#endif
var color = VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowBackgroundColorKey);
var color = VSColorTheme.GetThemedColor(ThemedDialogColors.WindowPanelBrushKey);

var response = await visualizerTarget.ObjectSource.RequestDataAsync(new ReadOnlySequence<byte>([color.R, color.G, color.B]), CancellationToken.None);

Expand Down
6 changes: 3 additions & 3 deletions src/IQueryableObjectSource/EFCoreQueryableObjectSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public override void TransferData(object target, Stream incomingData, Stream out

if (incomingData.Read(buffer, 0, buffer.Length) == buffer.Length)
{
r = (int)(Math.Min(buffer[0] * 1.1, 255));
g = (int)(Math.Min(buffer[1] * 1.1, 255));
b = (int)(Math.Min(buffer[2] * 1.1, 255));
r = buffer[0];
g = buffer[1];
b = buffer[2];
}

isBackgroundDarkColor = r * 0.2126 + g * 0.7152 + b * 0.0722 < 255 / 2.0;
Expand Down

0 comments on commit 8e8b42c

Please sign in to comment.