Skip to content

Comments

Tweaking the focus state for AP#43306

Merged
lei9444 merged 2 commits intomainfrom
niels9001/ap-intelligent-underline
Nov 5, 2025
Merged

Tweaking the focus state for AP#43306
lei9444 merged 2 commits intomainfrom
niels9001/ap-intelligent-underline

Conversation

@niels9001
Copy link
Collaborator

Adding the AI underline to the inputbox

image

@lei9444 lei9444 merged commit b7b6ae6 into main Nov 5, 2025
14 checks passed
@yeelam-gordon yeelam-gordon requested a review from Copilot November 7, 2025 01:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the AdvancedPaste PromptBox control's focus indicator by replacing theme-aware gradient border styling with a simpler gradient underline, and adjusts the loading text appearance.

  • Replaces theme-specific gradient borders with a fixed gradient underline on the text input
  • Simplifies the loading text styling by removing font weight and changing foreground color
  • Removes ThemeDictionaries that provided different accent gradients for Default, Light, and HighContrast themes

</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<LinearGradientBrush x:Name="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Use x:Key instead of x:Name for resource dictionary items. Resources defined in a ResourceDictionary should use x:Key to be referenced with {StaticResource}. Change to: <LinearGradientBrush x:Key="IntelligentUnderlineGradient" ...

Suggested change
<LinearGradientBrush x:Name="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush x:Key="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +23
<LinearGradientBrush x:Name="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0.0" Color="#FF0078D4" />
<GradientStop Offset="0.42" Color="#FF464FEB" />
<GradientStop Offset="0.87" Color="#FFD660FF" />
<GradientStop Offset="1.0" Color="#FFFEA874" />
</LinearGradientBrush>
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The hard-coded gradient colors do not adapt to different themes (Dark, Light, High Contrast). Consider wrapping this brush in ResourceDictionary.ThemeDictionaries with theme-specific color values to ensure proper contrast and accessibility across all themes, especially for High Contrast mode where this gradient may not be visible.

Suggested change
<LinearGradientBrush x:Name="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0.0" Color="#FF0078D4" />
<GradientStop Offset="0.42" Color="#FF464FEB" />
<GradientStop Offset="0.87" Color="#FFD660FF" />
<GradientStop Offset="1.0" Color="#FFFEA874" />
</LinearGradientBrush>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<LinearGradientBrush x:Key="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0.0" Color="#FF0078D4" />
<GradientStop Offset="0.42" Color="#FF464FEB" />
<GradientStop Offset="0.87" Color="#FFD660FF" />
<GradientStop Offset="1.0" Color="#FFFEA874" />
</LinearGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<LinearGradientBrush x:Key="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0.0" Color="#FF0078D4" />
<GradientStop Offset="0.42" Color="#FF464FEB" />
<GradientStop Offset="0.87" Color="#FFD660FF" />
<GradientStop Offset="1.0" Color="#FFFEA874" />
</LinearGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<LinearGradientBrush x:Key="IntelligentUnderlineGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Offset="0.0" Color="#FF0078D4" />
<GradientStop Offset="0.42" Color="#FF464FEB" />
<GradientStop Offset="0.87" Color="#FFD660FF" />
<GradientStop Offset="1.0" Color="#FFFEA874" />
</LinearGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<!-- Use system brush for visibility in High Contrast mode -->
<SolidColorBrush x:Key="IntelligentUnderlineGradient" Color="{ThemeResource SystemColorHighlightColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Copilot uses AI. Check for mistakes.
Foreground="{ThemeResource AccentGradientBrush}"
Margin="4,4,0,0"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Style="{StaticResource CaptionTextBlockStyle}"
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The removal of FontWeight="SemiBold" reduces the visual prominence of the loading text. Consider if this change is intentional, as loading states typically benefit from increased visual weight to draw user attention.

Suggested change
Style="{StaticResource CaptionTextBlockStyle}"
Style="{StaticResource CaptionTextBlockStyle}"
FontWeight="SemiBold"

Copilot uses AI. Check for mistakes.
@yeelam-gordon yeelam-gordon added the Product-Advanced Paste Refers to the Advanced Paste module label Nov 11, 2025
@yeelam-gordon yeelam-gordon added this to the PowerToys 0.96 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In for .96 Product-Advanced Paste Refers to the Advanced Paste module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants