Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always specify Image width/height for glyphs sourced from IGlyphService #76935

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

sandyarmstrong
Copy link
Member

In VS 17.14 (and previews of 17.13, but we are reverting for P5), the editor's IGlyphService implementation was improved to return images from IVsImageService2 based on the appropriate moniker. This fixes several instances of blurry 16px icons throughout the IDE.

Unfortunately, some WPF components failed to specify explicit Image dimensions, leading to larger than expected glyphs in the UI.

image

Additionally, these proper VS icons require theming, or else you can get black-on-black or other poor contrast scenarios.

These changes add explicit dimensions to Images that display glyphs from IGlyphService. It also uses ThemedImageSourceConverter to theme the images correctly. Sometimes this requires setting ImageThemingUtilities.ImageBackgroundColor.

NOTE: MoveStaticMembersDialog is not themed, so I did not apply the changes necessary to theme the icon correctly.

In VS 17.13, the editor's `IGlyphService` implementation was improved to
return images from `IVsImageService2` based on the appropriate moniker.
This fixes several instances of blurry 16px icons throughout the IDE.

Unfortunately, some WPF components failed to specify explicit `Image`
dimensions, leading to larger than expected glyphs in the UI.

Additionally, these proper VS icons require theming, or else you can get
black-on-black or other poor contrast scenarios.

These changes add explicit dimensions to `Image`s that display glyphs
from `IGlyphService`. It also uses `ThemedImageSourceConverter` to theme
the images correctly. Sometimes this requires setting
`ImageThemingUtilities.ImageBackgroundColor`.

NOTE: `MoveStaticMembersDialog` is not themed, so I did not apply the
changes necessary to theme the icon correctly.
@sandyarmstrong sandyarmstrong requested a review from a team as a code owner January 27, 2025 18:08
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 27, 2025
@JoeRobich
Copy link
Member

Resolves #76772

@sandyarmstrong
Copy link
Member Author

sandyarmstrong commented Jan 27, 2025

BTW, here's 17.12...

image

After this PR

image

@CyrusNajmabadi
Copy link
Member

I kinda like the current state. It has... gravitas.

@JoeRobich
Copy link
Member

BTW, here's 17.12...

That is a crisp image!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Needs UX Triage untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants