fix: align numbered list markers with the text baseline

This commit is contained in:
2026-10-19 21:13:09 +02:00
parent fe252cb648
commit 70c224e6f1
3 changed files with 45 additions and 3 deletions
+3 -2
View File
@@ -36,8 +36,9 @@ private final class ListAttachmentCell: NSTextAttachmentCell {
let label = attributedStringValue
let size = label.size()
let x = alignment == .center ? cellFrame.midX - size.width / 2 : cellFrame.maxX - 4 - size.width
label.draw(at: NSPoint(x: x,
y: cellFrame.midY - size.height / 2))
let y = alignment == .center ? cellFrame.midY - size.height / 2
: cellFrame.maxY + cellBaselineOffset().y - ceil(NotesAppearance.font.ascender)
label.draw(at: NSPoint(x: x, y: y))
}
}