mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
Blurry Text for PT Run improvements (#6049)
* Checking in adjustments based off @anuthadev pr's * Forcing an improvement on the magnifier glass * removing whitespace
This commit is contained in:
@@ -4,13 +4,12 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PowerLauncher"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="720">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="QueryTextBoxStyle" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Background" Value="{DynamicResource SystemChromeLow}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ControlTextBrushKey}"/>
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource ControlTextBrushKey}"/>
|
||||
@@ -25,7 +24,18 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Grid>
|
||||
<TextBlock Margin="15, 1, 0, 0" Text="{TemplateBinding Tag}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Background="{TemplateBinding Background}" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ScrollViewer.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Background="{Binding Background, ElementName=PART_ContentHost}" RenderOptions.ClearTypeHint="Enabled" TextOptions.TextFormattingMode="Display">
|
||||
<ContentPresenter Content="{Binding Path=Content, ElementName=PART_ContentHost}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ScrollViewer.ContentTemplate>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<TextBlock Margin="14, 0, 0, 0" Text="{TemplateBinding Tag}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="Transparent"/>
|
||||
@@ -37,9 +47,6 @@
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
@@ -75,22 +82,10 @@
|
||||
<ColumnDefinition Width="72"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
x:Name="AutoCompleteTextBlock"
|
||||
x:FieldModifier="public"
|
||||
Opacity="0.6"
|
||||
Canvas.ZIndex="0"
|
||||
Margin="24, 0, 14, 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
||||
/>
|
||||
|
||||
<!--
|
||||
for adding on placeholder, look at the style with 90 votes
|
||||
https://stackoverflow.com/questions/11873378/adding-placeholder-text-to-textbox
|
||||
-->
|
||||
|
||||
<TextBox
|
||||
AutomationProperties.Name="{DynamicResource Query}"
|
||||
x:Name="QueryTextBox"
|
||||
@@ -101,16 +96,30 @@
|
||||
FontSize="24"
|
||||
Style="{StaticResource QueryTextBoxStyle}"
|
||||
Tag="{DynamicResource startTyping}"
|
||||
RenderOptions.ClearTypeHint="Enabled"
|
||||
/>
|
||||
|
||||
<TextBlock
|
||||
x:Name="AutoCompleteTextBlock"
|
||||
x:FieldModifier="public"
|
||||
Opacity="0.6"
|
||||
Canvas.ZIndex="0"
|
||||
Margin="24, 0, 14, 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
||||
RenderOptions.ClearTypeHint="Enabled"
|
||||
/>
|
||||
<TextBlock
|
||||
AutomationProperties.Name="{DynamicResource SearchIcon}"
|
||||
Grid.Column="1"
|
||||
Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="24"
|
||||
FontSize="26"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}" />
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
||||
RenderOptions.ClearTypeHint="Enabled"
|
||||
TextOptions.TextRenderingMode="Auto"
|
||||
SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user