Skip to content

Fix centering of SVG icon#963

Merged
juliasilge merged 1 commit intomainfrom
fix-svg-icon-centering
May 5, 2026
Merged

Fix centering of SVG icon#963
juliasilge merged 1 commit intomainfrom
fix-svg-icon-centering

Conversation

@juliasilge
Copy link
Copy Markdown
Collaborator

This PR fixes the centering of the SVG icon:

  • Center the qmd.svg language file icon within its 16x16 viewBox. The four-quadrant disk was offset ~2 units to the right (centered at x≈10 instead of x=8), making the icon visibly lopsided when rendered.
  • All four path coordinates shifted left by 2 units; bounds are now x: 2.5–13.5, y: 2.5–13.5.

Why haven't we noticed this problem?! Because VS Code only renders contributes.languages.icon when the user has no file icon theme active (File Icon Theme → None). With any active theme, including the default Seti theme or popular ones like Material Icon Theme, VS Code uses the theme's icon instead of the language contribution. Since virtually all users have a file icon theme enabled, the off-center qmd.svg was effectively invisible in day-to-day use.

This has come to light because of changes that @dhruvisompura has been making in posit-dev/positron#13162 and related work. It turns out this is extremely noticeable when you change to a different third party file icon theme.

@posit-snyk-bot
Copy link
Copy Markdown
Contributor

posit-snyk-bot commented May 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@juliasilge juliasilge requested review from cscheid and vezwork May 4, 2026 18:54
@juliasilge
Copy link
Copy Markdown
Collaborator Author

We'd like to get this merged and released, so we can incorporate these changes into posit-dev/positron#13343.

Copy link
Copy Markdown
Member

@cscheid cscheid left a comment

Choose a reason for hiding this comment

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

😱 Looks great now, thank you!

@juliasilge juliasilge merged commit 19f62b2 into main May 5, 2026
4 checks passed
@juliasilge juliasilge deleted the fix-svg-icon-centering branch May 5, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants