Skip to content

Commit 47c4023

Browse files
authored
Merge pull request #918 from Garulf/fix-offset-suggestion-text
Add offset to suggestion text hide calculation
2 parents 83a357a + 301dd61 commit 47c4023

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
5353
// Check if Text will be larger then our QueryTextBox
5454
System.Windows.Media.Typeface typeface = new Typeface(QueryTextBox.FontFamily, QueryTextBox.FontStyle, QueryTextBox.FontWeight, QueryTextBox.FontStretch);
5555
System.Windows.Media.FormattedText ft = new FormattedText(QueryTextBox.Text, System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, typeface, QueryTextBox.FontSize, Brushes.Black);
56-
if (ft.Width > QueryTextBox.ActualWidth || QueryTextBox.HorizontalOffset != 0)
56+
57+
var offset = QueryTextBox.Padding.Right;
58+
59+
if ((ft.Width + offset) > QueryTextBox.ActualWidth || QueryTextBox.HorizontalOffset != 0)
5760
{
5861
return string.Empty;
5962
};

0 commit comments

Comments
 (0)