Skip to content

fix: center diff change indicators and fix width calculation#2275

Open
gotoh wants to merge 1 commit intosourcegit-scm:developfrom
gotoh:diff-mod-margin
Open

fix: center diff change indicators and fix width calculation#2275
gotoh wants to merge 1 commit intosourcegit-scm:developfrom
gotoh:diff-mod-margin

Conversation

@gotoh
Copy link
Copy Markdown
Contributor

@gotoh gotoh commented Apr 17, 2026

Problem

"+" indicator is not fully drawing in some fonts.

Example, with monospace font="IPAexGothic", Size=13:
image

Changes

  • Center the +/- indicators horizontally in the diff gutter
  • Use Math.Max(minus.Width, plus.Width) for accurate margin width instead of only measuring the '-' character

Fixed view:
image

- Center the +/- indicators horizontally in the diff gutter
- Use Math.Max(minus.Width, plus.Width) for accurate margin width
  instead of only measuring the '-' character
@love-linger
Copy link
Copy Markdown
Collaborator

... Why not use a TRUE monospaced font?

@gotoh
Copy link
Copy Markdown
Contributor Author

gotoh commented Apr 17, 2026

I noticed something was off while trying out different fonts...

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.

2 participants