Skip to content

Commit d4b3f16

Browse files
Revert show warning logic
1 parent 82ca8c3 commit d4b3f16

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Globalization;
44
using System.IO;
55
using System.Linq;
6-
using System.Security.Policy;
76
using System.Windows;
87
using System.Windows.Media;
98
using System.Windows.Media.Imaging;
@@ -187,17 +186,15 @@ public bool UseSound
187186
get => Settings.UseSound;
188187
set => Settings.UseSound = value;
189188
}
190-
public bool CheckMediaPlayer
189+
190+
public bool ShowWMPWarning
191191
{
192-
get
193-
{
194-
if (Settings.WMPInstalled)
195-
{
196-
return true;
197-
}
198-
else { return false; }
199-
}
200-
set { }
192+
get => !Settings.WMPInstalled;
193+
}
194+
195+
public bool EnableVolumeAdjustment
196+
{
197+
get => Settings.WMPInstalled;
201198
}
202199

203200
public double SoundEffectVolume

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
<cc:Card
441441
Title="{DynamicResource SoundEffectVolume}"
442442
Icon="&#xe994;"
443-
IsEnabled="{Binding CheckMediaPlayer}"
443+
IsEnabled="{Binding EnableVolumeAdjustment}"
444444
Sub="{DynamicResource SoundEffectVolumeTip}"
445445
Visibility="{Binding UseSound, Converter={StaticResource BoolToVisibilityConverter}}">
446446
<StackPanel Orientation="Horizontal">
@@ -469,7 +469,7 @@
469469
BorderBrush="{DynamicResource Color03B}"
470470
BorderThickness="0,1,0,0"
471471
CornerRadius="5 5 5 5"
472-
Visibility="{Binding CheckMediaPlayer, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}">
472+
Visibility="{Binding ShowWMPWarning, Converter={StaticResource BoolToVisibilityConverter}}">
473473
<Grid VerticalAlignment="Center">
474474
<Grid.ColumnDefinitions>
475475
<ColumnDefinition Width="58" />

0 commit comments

Comments
 (0)