diff --git a/Flow.Launcher/Converters/ProgressForegroundConverter.cs b/Flow.Launcher/Converters/ProgressForegroundConverter.cs new file mode 100644 index 000000000..6190f0399 --- /dev/null +++ b/Flow.Launcher/Converters/ProgressForegroundConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + +namespace Flow.Launcher.Converters +{ + public class ProgressForegroundConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + double progress = (double)value; + string foreground = "#26a0da"; + + if (progress >= 90) + { + foreground = "#da2626"; + } + + return foreground; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 4c1b068f8..f0e090a05 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -46,6 +46,7 @@ + @@ -113,6 +114,7 @@