PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Fix Color Picker format name truncation issue

Open ThanhNguyxn opened this issue 3 weeks ago • 1 comments

Summary of the Pull Request

Fixes #25063 - Long color format names are cut off in the Color Picker editor, causing names like "DECIMAL" to appear as "DECIMAI".

PR Checklist

  • [x] Closes #25063
  • [x] Target branch: main
  • [x] Tests added/passed: N/A - visual fix only
  • [x] Documentation updated: N/A

Detailed Description of the Pull Request / Additional comments

The first column width in ColorFormatControl.xaml was set to a fixed 48 pixels, which is too narrow to display longer format names like:

  • DECIMAL (7 chars)
  • HEX Int (7 chars)
  • CIEXYZ (6 chars)
  • CIELAB (6 chars)

This caused the last character(s) to be clipped, making "DECIMAL" appear as "DECIMAI" as shown in the issue.

Solution

Increased the column width from 48px to 64px. This provides enough space to display all current format names while maintaining the existing layout proportions.

The TextTrimming="CharacterEllipsis" is already set on the FormatNameTextBlock, so any custom format names that exceed the new width will be properly truncated with "..." instead of being cut off abruptly.

Before

image

After

The format name "DECIMAL" should now display correctly without being cut off.

ThanhNguyxn avatar Dec 03 '25 08:12 ThanhNguyxn

@microsoft-github-policy-service agree

ThanhNguyxn avatar Dec 03 '25 08:12 ThanhNguyxn