Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
Expand Down Expand Up @@ -43,8 +44,16 @@ values[2] is not string queryText ||

// 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it due to a warning suggesting to include DPI information.

var ft = new FormattedText(
queryTextBox.Text,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
typeface,
queryTextBox.FontSize,
Brushes.Black,
dpi.PixelsPerDip
);

var offset = queryTextBox.Padding.Right;

Expand Down
2 changes: 2 additions & 0 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<system:String x:Key="GameMode">Game Mode</system:String>
<system:String x:Key="GameModeToolTip">Suspend the use of Hotkeys.</system:String>
<system:String x:Key="PositionReset">Position Reset</system:String>
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>

<!-- Setting General -->
Expand Down Expand Up @@ -109,6 +110,7 @@
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
<system:String x:Key="searchDelay">Search Delay</system:String>
<system:String x:Key="searchDelayToolTip">Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.</system:String>
<system:String x:Key="searchDelayNumberBoxToolTip">Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.</system:String>
<system:String x:Key="searchDelayTime">Default Search Delay Time</system:String>
<system:String x:Key="searchDelayTimeToolTip">Wait time before showing results after typing stops. Higher values wait longer. (ms)</system:String>

Expand Down
5 changes: 4 additions & 1 deletion Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@
PlaceholderText="{Binding DefaultSearchDelay}"
SmallChange="10"
SpinButtonPlacementMode="Compact"
ToolTip="{DynamicResource searchDelayToolTip}"
ToolTip="{DynamicResource searchDelayNumberBoxToolTip}"
ToolTipService.InitialShowDelay="0"
ToolTipService.ShowOnDisabled="True"
Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />

</StackPanel>

<!-- Put OnOffControl after PriorityControl & SearchDelayControl so that it can display correctly -->
Expand Down
11 changes: 6 additions & 5 deletions Flow.Launcher/Resources/CustomControlTemplate.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,6 @@
BasedOn="{StaticResource DefaultComboBoxStyle}"
TargetType="ComboBox">
<Setter Property="Padding" Value="12 0 0 0" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="ui:ControlHelper.CornerRadius" Value="0" />
Expand Down Expand Up @@ -2784,9 +2783,12 @@
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource TextControlHeaderForegroundDisabled}" />
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundDisabled}" />
<Setter Property="Background" Value="{DynamicResource CustomNumberBoxBGDisabled}" />
<Setter TargetName="BorderElementInline" Property="Background" Value="{DynamicResource TextControlBackgroundDisabled}" />
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushDisabled}" />
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundDisabled}" />
<Setter TargetName="BorderElement" Property="BorderThickness" Value="0 0 0 0" />
<Setter TargetName="BorderElementInline" Property="BorderThickness" Value="0 0 0 0" />
<Setter Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundDisabled}" />
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundDisabled}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
Expand All @@ -2801,7 +2803,7 @@
<Setter TargetName="BorderElementInline" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushFocused}" />
<Setter TargetName="BorderElementInline" Property="BorderThickness" Value="0 0 0 2" />
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource CustomTextBoxOutline}" />
<Setter TargetName="BorderElement" Property="BorderThickness" Value="{DynamicResource 2 2 2 0}" />
<Setter TargetName="BorderElement" Property="BorderThickness" Value="2 2 2 0" />
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundFocused}" />
</Trigger>
<MultiTrigger>
Expand Down Expand Up @@ -2872,7 +2874,6 @@
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{DynamicResource Color05B}"
InputScope="{TemplateBinding InputScope}"
SelectionBrush="{TemplateBinding SelectionBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
Expand Down
Loading