Skip to content

Commit 76357fb

Browse files
Update tooltip when hotkey changes
1 parent 0140e34 commit 76357fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@
736736
<ItemsControl Style="{StaticResource SettingGrid}">
737737
<StackPanel Style="{StaticResource TextPanel}">
738738
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource AlwaysPreview}" />
739-
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource AlwaysPreviewToolTip}" />
739+
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{Binding AlwaysPreviewToolTip}" />
740740
</StackPanel>
741741
<ui:ToggleSwitch
742742
Grid.Column="2"

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public SettingWindowViewModel(Updater updater, IPortable portable)
5858
case nameof(Settings.Language):
5959
OnPropertyChanged(nameof(ClockText));
6060
OnPropertyChanged(nameof(DateText));
61+
OnPropertyChanged(nameof(AlwaysPreviewToolTip));
62+
break;
63+
case nameof(Settings.PreviewHotkey):
64+
OnPropertyChanged(nameof(AlwaysPreviewToolTip));
6165
break;
6266
}
6367
};
@@ -243,7 +247,7 @@ public List<string> QuerySearchPrecisionStrings
243247
public List<Language> Languages => _translater.LoadAvailableLanguages();
244248
public IEnumerable<int> MaxResultsRange => Enumerable.Range(2, 16);
245249

246-
public string AlwaysPreviewTooltip => string.Format(_translater.GetTranslation("AlwaysPreviewToolTip"), Settings.PreviewHotkey);
250+
public string AlwaysPreviewToolTip => string.Format(_translater.GetTranslation("AlwaysPreviewToolTip"), Settings.PreviewHotkey);
247251

248252
public string TestProxy()
249253
{

0 commit comments

Comments
 (0)