mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Tweaking the focus state for AP (#43306)
Adding the AI underline to the inputbox <img width="656" height="583" alt="image" src="https://github.com/user-attachments/assets/998a4203-61d7-4228-a682-391c6d78b3a5" />
This commit is contained in:
@@ -14,28 +14,13 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
|
||||||
<ResourceDictionary x:Key="Default">
|
<LinearGradientBrush x:Name="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
|
||||||
<Color x:Key="AccentGradientColor">#65C8F2</Color>
|
<GradientStop Offset="0.0" Color="#FF0078D4" />
|
||||||
<LinearGradientBrush x:Key="AccentGradientBrush" StartPoint="0,0" EndPoint="1,1">
|
<GradientStop Offset="0.42" Color="#FF464FEB" />
|
||||||
<GradientStop Offset="0.0" Color="#98EFFE" />
|
<GradientStop Offset="0.87" Color="#FFD660FF" />
|
||||||
<GradientStop Offset="0.25" Color="#48B1E9" />
|
<GradientStop Offset="1.0" Color="#FFFEA874" />
|
||||||
<GradientStop Offset="1.0" Color="{StaticResource AccentGradientColor}" />
|
</LinearGradientBrush>
|
||||||
</LinearGradientBrush>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="Light">
|
|
||||||
<Color x:Key="AccentGradientColor">#005FB8</Color>
|
|
||||||
<LinearGradientBrush x:Key="AccentGradientBrush" StartPoint="0,0" EndPoint="1,1">
|
|
||||||
<GradientStop Offset="0.0" Color="#4992C7" />
|
|
||||||
<GradientStop Offset="0.25" Color="#1353A0" />
|
|
||||||
<GradientStop Offset="1.0" Color="{StaticResource AccentGradientColor}" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="HighContrast">
|
|
||||||
<Color x:Key="AccentGradientColor">#48B1E9</Color>
|
|
||||||
<SolidColorBrush x:Key="AccentGradientBrush" Color="{StaticResource AccentGradientColor}" />
|
|
||||||
</ResourceDictionary>
|
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
|
||||||
<x:Double x:Key="ModelSelectorButtonWidth">44</x:Double>
|
<x:Double x:Key="ModelSelectorButtonWidth">44</x:Double>
|
||||||
<Style x:Key="CustomTextBoxStyle" TargetType="TextBox">
|
<Style x:Key="CustomTextBoxStyle" TargetType="TextBox">
|
||||||
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />
|
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />
|
||||||
@@ -171,6 +156,19 @@
|
|||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
Control.IsTemplateFocusTarget="True"
|
Control.IsTemplateFocusTarget="True"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
<Rectangle
|
||||||
|
x:Name="FocusHighlighter"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.RowSpan="1"
|
||||||
|
Grid.ColumnSpan="4"
|
||||||
|
Height="2"
|
||||||
|
Margin="12,0,12,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Fill="{StaticResource IntelligentUnderlineGradient}"
|
||||||
|
RadiusX="1"
|
||||||
|
RadiusY="1"
|
||||||
|
Visibility="Collapsed" />
|
||||||
<Grid Grid.Row="1" Width="{StaticResource ModelSelectorButtonWidth}">
|
<Grid Grid.Row="1" Width="{StaticResource ModelSelectorButtonWidth}">
|
||||||
<ProgressRing
|
<ProgressRing
|
||||||
Width="20"
|
Width="20"
|
||||||
@@ -282,7 +280,10 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundFocused}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundFocused}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusHighlighter" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0">
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
<DiscreteObjectKeyFrame.Value>
|
<DiscreteObjectKeyFrame.Value>
|
||||||
<LinearGradientBrush MappingMode="Absolute" StartPoint="0,0" EndPoint="0,2">
|
<LinearGradientBrush MappingMode="Absolute" StartPoint="0,0" EndPoint="0,2">
|
||||||
@@ -299,7 +300,7 @@
|
|||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderThickness">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderThickness">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderThemeThicknessFocused}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderThemeThicknessFocused}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>-->
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@@ -740,8 +741,8 @@
|
|||||||
x:Name="LoadingText"
|
x:Name="LoadingText"
|
||||||
x:Uid="LoadingText"
|
x:Uid="LoadingText"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
FontWeight="SemiBold"
|
Margin="4,4,0,0"
|
||||||
Foreground="{ThemeResource AccentGradientBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Visibility="Collapsed">
|
Visibility="Collapsed">
|
||||||
<animations:Implicit.ShowAnimations>
|
<animations:Implicit.ShowAnimations>
|
||||||
|
|||||||
Reference in New Issue
Block a user