Skip to content

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

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

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

Conversation

@gotoh

@gotoh gotoh commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

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

gotoh commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

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

2 participants