Add ShowPluginBadges settings

This commit is contained in:
Jack251970 2025-04-11 14:58:47 +08:00
parent 3e20c518a0
commit 47398f104f
3 changed files with 7 additions and 1 deletions

View file

@ -101,6 +101,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
public double SoundVolume { get; set; } = 50;
public bool ShowPluginBadges { get; set; } = false;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;

View file

@ -146,7 +146,7 @@
VerticalAlignment="Bottom"
RenderOptions.BitmapScalingMode="Fant"
Source="{Binding Image, TargetNullValue={x:Null}}"
Visibility="{Binding ShowBadge, Converter={StaticResource BoolToVisibilityConverter}}" />
Visibility="{Binding ShowBadge}" />
</Grid>
</Border>
</Grid>

View file

@ -123,6 +123,11 @@ namespace Flow.Launcher.ViewModel
}
}
public Visibility ShowBadge
{
get => Settings.ShowPluginBadges ? Visibility.Visible : Visibility.Collapsed;
}
private bool GlyphAvailable => Glyph is not null;
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPath) || Result.Icon is not null;