mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use text path
This commit is contained in:
parent
f24c14183c
commit
8b33ca9a41
2 changed files with 5 additions and 7 deletions
|
|
@ -11,15 +11,13 @@ namespace Flow.Launcher.Converters
|
|||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length != 2)
|
||||
if (values.Length != 3)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
var QueryText = values[0] as TextBox;
|
||||
var QueryTextBox = values[0] as TextBox;
|
||||
|
||||
|
||||
|
||||
var queryText = QueryText.Text;
|
||||
var queryText = (string)values[2];
|
||||
|
||||
if (string.IsNullOrEmpty(queryText))
|
||||
return string.Empty;
|
||||
|
|
@ -43,7 +41,7 @@ namespace Flow.Launcher.Converters
|
|||
var selectedResultActionKeyword = string.IsNullOrEmpty(selectedResult.ActionKeywordAssigned) ? "" : selectedResult.ActionKeywordAssigned + " ";
|
||||
var selectedResultPossibleSuggestion = selectedResultActionKeyword + selectedResult.Title;
|
||||
|
||||
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase) || QueryText.HorizontalOffset != 0)
|
||||
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase) || QueryTextBox.HorizontalOffset != 0)
|
||||
return string.Empty;
|
||||
|
||||
// When user typed lower case and result title is uppercase, we still want to display suggestion
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
Style="{DynamicResource QuerySuggestionBoxStyle}">
|
||||
<TextBox.Text>
|
||||
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
|
||||
<Binding ElementName="QueryTextBox" Mode="OneWay" />
|
||||
<Binding ElementName="QueryTextBox" Mode="OneTime" />
|
||||
<Binding ElementName="ResultListBox" Path="SelectedItem" />
|
||||
<Binding ElementName="QueryTextBox" Path="Text" />
|
||||
</MultiBinding>
|
||||
|
|
|
|||
Loading…
Reference in a new issue