mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
parent
1a49178ebe
commit
0acd2e1298
5 changed files with 1 additions and 43 deletions
|
|
@ -40,7 +40,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public string ResultFontStretch { get; set; }
|
||||
public bool UseGlyphIcons { get; set; } = true;
|
||||
public bool UseAnimation { get; set; } = true;
|
||||
public bool SubtitleHighlight { get; set; } = false;
|
||||
public bool UseSound { get; set; } = true;
|
||||
public bool FirstLaunch { get; set; } = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,11 @@ using System.Windows;
|
|||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Documents;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Core.Resource;
|
||||
|
||||
namespace Flow.Launcher.Converters
|
||||
{
|
||||
public class HighlightTextConverter : IMultiValueConverter
|
||||
{
|
||||
public Settings Settings { get;}
|
||||
Settings settings = new Settings();
|
||||
public object Convert(object[] value, Type targetType, object parameter, CultureInfo cultureInfo)
|
||||
{
|
||||
var text = value[0] as string;
|
||||
|
|
@ -35,14 +31,8 @@ namespace Flow.Launcher.Converters
|
|||
var currentCharacter = text.Substring(i, 1);
|
||||
if (this.ShouldHighlight(highlightData, i))
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(settings.SubtitleHighlight);
|
||||
if (settings.SubtitleHighlight == true)
|
||||
{
|
||||
|
||||
textBlock.Inlines.Add(new Run(currentCharacter) { Style = (Style)Application.Current.FindResource("HighlightStyle") });
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -62,6 +52,5 @@ namespace Flow.Launcher.Converters
|
|||
{
|
||||
return highlightData.Contains(index);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@
|
|||
<system:String x:Key="ThemeFolder">Theme Folder</system:String>
|
||||
<system:String x:Key="OpenThemeFolder">Open Theme Folder</system:String>
|
||||
<system:String x:Key="ColorScheme">Color Scheme</system:String>
|
||||
<system:String x:Key="SubtitleHihglight">Subtitle Highlight</system:String>
|
||||
<system:String x:Key="ColorSchemeSystem">System Default</system:String>
|
||||
<system:String x:Key="ColorSchemeLight">Light</system:String>
|
||||
<system:String x:Key="ColorSchemeDark">Dark</system:String>
|
||||
|
|
|
|||
|
|
@ -1937,29 +1937,6 @@
|
|||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Separator
|
||||
Width="Auto"
|
||||
BorderThickness="1"
|
||||
Style="{StaticResource SettingSeparatorStyle}" />
|
||||
<Border
|
||||
Margin="0,0,0,0"
|
||||
BorderThickness="0"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SubtitleHihglight}" />
|
||||
</StackPanel>
|
||||
<ui:ToggleSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,2,0"
|
||||
IsOn="{Binding SubtitleHighlight, Mode=TwoWay}" />
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
|
|
|
|||
|
|
@ -356,18 +356,12 @@ namespace Flow.Launcher.ViewModel
|
|||
set => Settings.UseAnimation = value;
|
||||
}
|
||||
|
||||
|
||||
public bool UseSound
|
||||
{
|
||||
get => Settings.UseSound;
|
||||
set => Settings.UseSound = value;
|
||||
}
|
||||
|
||||
public bool SubtitleHighlight
|
||||
{
|
||||
get => Settings.SubtitleHighlight;
|
||||
set => Settings.SubtitleHighlight = value;
|
||||
}
|
||||
public Brush PreviewBackground
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in a new issue