feat(editor): overlay scrollbar, visible only while scrolling (#77)
This commit is contained in:
1 parent
46441438a2
commit
ffb80be225
1 file changed
+3
@@ -293,6 +293,9 @@ struct ProseTextView: NSViewRepresentable {
|
|||||||
scroll.documentView = tv
|
scroll.documentView = tv
|
||||||
scroll.hasVerticalScroller = true
|
scroll.hasVerticalScroller = true
|
||||||
scroll.autohidesScrollers = true
|
scroll.autohidesScrollers = true
|
||||||
|
// #77: overlay style — the knob appears during scrolling and fades
|
||||||
|
// out at rest (iOS-like), instead of always occupying the right edge.
|
||||||
|
scroll.scrollerStyle = .overlay
|
||||||
scroll.drawsBackground = true
|
scroll.drawsBackground = true
|
||||||
scroll.backgroundColor = NSColor.white
|
scroll.backgroundColor = NSColor.white
|
||||||
context.coordinator.textView = tv
|
context.coordinator.textView = tv
|
||||||
|
|||||||
Reference in new issue
Block a user