mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Improve invisible character drawing on a non-opaque view
This commit is contained in:
parent
34f115fffe
commit
b76543f665
@ -19,6 +19,7 @@ develop
|
||||
|
||||
- Improve performance of closing large size document.
|
||||
- Add “.swift” extension to file types treaded as CotEditor script.
|
||||
- Improve invisible character drawing on a non-opaque view.
|
||||
- Change syntax style detection behavior to set “None” style if no appropriate style can be found on file opening.
|
||||
- [non-AppStore ver.] Update Sparkle framework to version 1.17.0.
|
||||
- And some minor improvements and fixes.
|
||||
|
@ -211,6 +211,11 @@ final class LayoutManager: NSLayoutManager {
|
||||
let string = self.textStorage?.string
|
||||
{
|
||||
let isVertical = (self.firstTextView?.layoutOrientation == .vertical)
|
||||
let isOpaque = self.firstTextView?.isOpaque ?? true
|
||||
|
||||
if !isOpaque {
|
||||
context.setShouldSmoothFonts(false)
|
||||
}
|
||||
|
||||
// flip coordinate if needed
|
||||
if NSGraphicsContext.current()?.isFlipped ?? false {
|
||||
@ -268,6 +273,10 @@ final class LayoutManager: NSLayoutManager {
|
||||
context.textPosition = point
|
||||
CTLineDraw(line, context)
|
||||
}
|
||||
|
||||
if !isOpaque {
|
||||
context.setShouldSmoothFonts(true)
|
||||
}
|
||||
}
|
||||
|
||||
super.drawGlyphs(forGlyphRange: glyphsToShow, at: origin)
|
||||
|
Loading…
Reference in New Issue
Block a user