Skip to content

Commit 0acd2e1

Browse files
committed
Revert "Add Subtext Highlight Setting"
This reverts commit 1a49178.
1 parent 1a49178 commit 0acd2e1

File tree

5 files changed

+1
-43
lines changed

5 files changed

+1
-43
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public string Language
4040
public string ResultFontStretch { get; set; }
4141
public bool UseGlyphIcons { get; set; } = true;
4242
public bool UseAnimation { get; set; } = true;
43-
public bool SubtitleHighlight { get; set; } = false;
4443
public bool UseSound { get; set; } = true;
4544
public bool FirstLaunch { get; set; } = true;
4645

Flow.Launcher/Converters/HighlightTextConverter.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@
88
using System.Windows.Data;
99
using System.Windows.Media;
1010
using System.Windows.Documents;
11-
using Flow.Launcher.Infrastructure.UserSettings;
12-
using Flow.Launcher.Core.Resource;
1311

1412
namespace Flow.Launcher.Converters
1513
{
1614
public class HighlightTextConverter : IMultiValueConverter
1715
{
18-
public Settings Settings { get;}
19-
Settings settings = new Settings();
2016
public object Convert(object[] value, Type targetType, object parameter, CultureInfo cultureInfo)
2117
{
2218
var text = value[0] as string;
@@ -35,14 +31,8 @@ public object Convert(object[] value, Type targetType, object parameter, Culture
3531
var currentCharacter = text.Substring(i, 1);
3632
if (this.ShouldHighlight(highlightData, i))
3733
{
38-
System.Diagnostics.Debug.WriteLine(settings.SubtitleHighlight);
39-
if (settings.SubtitleHighlight == true)
40-
{
34+
4135
textBlock.Inlines.Add(new Run(currentCharacter) { Style = (Style)Application.Current.FindResource("HighlightStyle") });
42-
}
43-
else
44-
{
45-
}
4636

4737
}
4838
else
@@ -62,6 +52,5 @@ private bool ShouldHighlight(List<int> highlightData, int index)
6252
{
6353
return highlightData.Contains(index);
6454
}
65-
6655
}
6756
}

Flow.Launcher/Languages/en.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
<system:String x:Key="ThemeFolder">Theme Folder</system:String>
9191
<system:String x:Key="OpenThemeFolder">Open Theme Folder</system:String>
9292
<system:String x:Key="ColorScheme">Color Scheme</system:String>
93-
<system:String x:Key="SubtitleHihglight">Subtitle Highlight</system:String>
9493
<system:String x:Key="ColorSchemeSystem">System Default</system:String>
9594
<system:String x:Key="ColorSchemeLight">Light</system:String>
9695
<system:String x:Key="ColorSchemeDark">Dark</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,29 +1937,6 @@
19371937
</TextBlock>
19381938
</ItemsControl>
19391939
</Border>
1940-
<Separator
1941-
Width="Auto"
1942-
BorderThickness="1"
1943-
Style="{StaticResource SettingSeparatorStyle}" />
1944-
<Border
1945-
Margin="0,0,0,0"
1946-
BorderThickness="0"
1947-
Style="{DynamicResource SettingGroupBox}">
1948-
<ItemsControl Style="{StaticResource SettingGrid}">
1949-
<StackPanel Style="{StaticResource TextPanel}">
1950-
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource SubtitleHihglight}" />
1951-
</StackPanel>
1952-
<ui:ToggleSwitch
1953-
Grid.Row="0"
1954-
Grid.Column="2"
1955-
Width="100"
1956-
Margin="0,0,2,0"
1957-
IsOn="{Binding SubtitleHighlight, Mode=TwoWay}" />
1958-
<TextBlock Style="{StaticResource Glyph}">
1959-
&#xea80;
1960-
</TextBlock>
1961-
</ItemsControl>
1962-
</Border>
19631940
</StackPanel>
19641941
</Border>
19651942

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,18 +356,12 @@ public bool UseAnimation
356356
set => Settings.UseAnimation = value;
357357
}
358358

359-
360359
public bool UseSound
361360
{
362361
get => Settings.UseSound;
363362
set => Settings.UseSound = value;
364363
}
365364

366-
public bool SubtitleHighlight
367-
{
368-
get => Settings.SubtitleHighlight;
369-
set => Settings.SubtitleHighlight = value;
370-
}
371365
public Brush PreviewBackground
372366
{
373367
get

0 commit comments

Comments
 (0)