Skip to content

Commit

Permalink
fix: Catch another exception
Browse files Browse the repository at this point in the history
  • Loading branch information
felixkmh committed Nov 14, 2022
1 parent a7407da commit 88953c3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/SearchPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,15 @@ internal void DisableGlassEffect()
searchWindow.BackgroundBorder.Background = Application.Current.TryFindResource("PopupBackgroundBrush") as Brush;
searchWindow.DetailsBackgroundVisual.Background = Application.Current.TryFindResource("PopupBackgroundBrush") as Brush;
searchWindow.HeaderBorder.Background = new SolidColorBrush { Color = Colors.Black, Opacity = 0.25 };
((Brush)searchWindow.SearchResults.Resources["GlyphBrush"]).Opacity = 1f;
((Brush)searchWindow.SearchResults.Resources["HoverBrush"]).Opacity = 1f;
try
{
((Brush)searchWindow.SearchResults.Resources["GlyphBrush"]).Opacity = 1f;
((Brush)searchWindow.SearchResults.Resources["HoverBrush"]).Opacity = 1f;
}
catch (Exception ex)
{
logger.Warn(ex, "Failed to set opacity for the QuickSearch background.");
}
searchWindow.BackgroundBorder.Effect = null;
var backgroundMargin = new Thickness();
searchWindow.BackgroundBorder.Margin = backgroundMargin;
Expand Down

0 comments on commit 88953c3

Please sign in to comment.