fix: align numbered list markers with the text baseline
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user