From d4b3f1667c93c88965c4ad112df22168dd78c898 Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 23 May 2024 22:34:17 +0800 Subject: [PATCH] Revert show warning logic --- .../ViewModels/SettingsPaneThemeViewModel.cs | 19 ++++++++----------- .../SettingPages/Views/SettingsPaneTheme.xaml | 4 ++-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index 5e8669450..deb063279 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Security.Policy; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; @@ -187,17 +186,15 @@ public partial class SettingsPaneThemeViewModel : BaseModel get => Settings.UseSound; set => Settings.UseSound = value; } - public bool CheckMediaPlayer + + public bool ShowWMPWarning { - get - { - if (Settings.WMPInstalled) - { - return true; - } - else { return false; } - } - set { } + get => !Settings.WMPInstalled; + } + + public bool EnableVolumeAdjustment + { + get => Settings.WMPInstalled; } public double SoundEffectVolume diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml index c93d1328c..c864d5e7d 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml @@ -440,7 +440,7 @@ @@ -469,7 +469,7 @@ BorderBrush="{DynamicResource Color03B}" BorderThickness="0,1,0,0" CornerRadius="5 5 5 5" - Visibility="{Binding CheckMediaPlayer, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}"> + Visibility="{Binding ShowWMPWarning, Converter={StaticResource BoolToVisibilityConverter}}">