Skip to content

Commit 85c58a9

Browse files
committed
Derive offset from Right side Textbox padding
1 parent c3ceed1 commit 85c58a9

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 + 40) > 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)