diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index fe0d0e970..445d033c7 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -217,9 +217,9 @@ namespace Flow.Launcher.Core.Resource style.Setters.Add(new Setter(Control.FontStretchProperty, fontStretch)); // Set caret brush (retain existing logic) - var caretBrushProperty = style.Setters.OfType().Where(x => x.Property.Name == "CaretBrush")? + var caretBrushProperty = style.Setters.OfType().Where(x => x.Property == TextBoxBase.CaretBrushProperty)? .FirstOrDefault(); - var foregroundPropertyValue = style.Setters.OfType().Where(x => x.Property.Name == "Foreground") + var foregroundPropertyValue = style.Setters.OfType().Where(x => x.Property == Control.ForegroundProperty) .Select(x => x.Value).FirstOrDefault(); if (caretBrushProperty != null && foregroundPropertyValue != null) { @@ -245,6 +245,7 @@ namespace Flow.Launcher.Core.Resource style.Setters.Remove(setter); } + // Add New font setter style.Setters.Add(new Setter(TextBlock.FontFamilyProperty, fontFamily)); style.Setters.Add(new Setter(TextBlock.FontStyleProperty, fontStyle)); style.Setters.Add(new Setter(TextBlock.FontWeightProperty, fontWeight));