mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix small warning
This commit is contained in:
parent
5e54416d3a
commit
c5f2868a9b
1 changed files with 11 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
|
@ -43,8 +44,16 @@ public class QuerySuggestionBoxConverter : IMultiValueConverter
|
|||
|
||||
// Check if Text will be larger than our QueryTextBox
|
||||
Typeface typeface = new Typeface(queryTextBox.FontFamily, queryTextBox.FontStyle, queryTextBox.FontWeight, queryTextBox.FontStretch);
|
||||
// TODO: Obsolete warning?
|
||||
var ft = new FormattedText(queryTextBox.Text, CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, typeface, queryTextBox.FontSize, Brushes.Black);
|
||||
var dpi = VisualTreeHelper.GetDpi(queryTextBox);
|
||||
var ft = new FormattedText(
|
||||
queryTextBox.Text,
|
||||
CultureInfo.CurrentCulture,
|
||||
FlowDirection.LeftToRight,
|
||||
typeface,
|
||||
queryTextBox.FontSize,
|
||||
Brushes.Black,
|
||||
dpi.PixelsPerDip
|
||||
);
|
||||
|
||||
var offset = queryTextBox.Padding.Right;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue