mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Adjust line number view ticks for vertical orientation
This commit is contained in:
parent
fb23961991
commit
acca92477f
@ -28,6 +28,7 @@ Change Log
|
||||
- Improve the algorithm of uncommenting.
|
||||
- Improve the algorithm of encoding detection.
|
||||
- Deprecate the “Ignore line endings when counting characters” option.
|
||||
- [trivial] Adjust ticks in the line number view for vertical orientation.
|
||||
- [trivial] Save documents asynchronously.
|
||||
- [trivial] Organize the editor's contextual menu.
|
||||
- [trivial] Improve the basic regular expression syntax reference.
|
||||
|
@ -55,7 +55,7 @@ final class LineNumberView: NSView {
|
||||
|
||||
// calculate margins
|
||||
self.padding = self.charWidth
|
||||
self.tickLength = (fontSize / 3).rounded(.up)
|
||||
self.tickLength = (scale * fontSize / 3).rounded(.up)
|
||||
}
|
||||
|
||||
}
|
||||
@ -254,7 +254,7 @@ final class LineNumberView: NSView {
|
||||
let textView = self.textView,
|
||||
let layoutManager = textView.layoutManager as? LayoutManager,
|
||||
let context = NSGraphicsContext.current?.cgContext
|
||||
else { return assertionFailure() }
|
||||
else { return assertionFailure() }
|
||||
|
||||
context.saveGState()
|
||||
|
||||
@ -315,7 +315,7 @@ final class LineNumberView: NSView {
|
||||
// draw tick
|
||||
if isVerticalText {
|
||||
let rect = CGRect(x: y.rounded() + 0.5, y: 1, width: 0, height: drawingInfo.tickLength)
|
||||
context.stroke(rect, width: 1)
|
||||
context.stroke(rect, width: scale)
|
||||
}
|
||||
|
||||
case .wrapped:
|
||||
|
Loading…
Reference in New Issue
Block a user