fix: match notes scroll offsets to compact bars
This commit is contained in:
@@ -145,7 +145,7 @@ Actions (Command-K) opens the same searchable popup style used throughout Conjur
|
|||||||
|
|
||||||
The bottom strip applies Markdown headings, bold, italic, strikethrough, inline code, links, fenced code blocks, quotes, numbered lists, bullet lists, and checklists. Formatting preserves embedded images and supports Undo. List buttons convert existing list types; clicking the current type removes its marker. The formatting strip is always visible. Successful autosaves stay unobtrusive; only save, load, or deletion errors appear below the editor.
|
The bottom strip applies Markdown headings, bold, italic, strikethrough, inline code, links, fenced code blocks, quotes, numbered lists, bullet lists, and checklists. Formatting preserves embedded images and supports Undo. List buttons convert existing list types; clicking the current type removes its marker. The formatting strip is always visible. Successful autosaves stay unobtrusive; only save, load, or deletion errors appear below the editor.
|
||||||
|
|
||||||
Note text fades at the editor’s scroll edges rather than clipping sharply above the formatting strip. Scroll insets keep the first and last lines clear of the fade when scrolled to either end. The compact 32-point header and 28-point formatting strip meet the editor without extra vertical gaps.
|
Note text fades over 16 points at the editor’s scroll edges rather than clipping sharply above the formatting strip. Matching 16-point scroll insets keep the first and last lines clear of the fade when scrolled to either end. The compact 32-point header and 28-point formatting strip meet the editor without extra vertical gaps.
|
||||||
|
|
||||||
Formatting shortcuts use the same actions as the bottom strip. They apply to the editor’s current selection or caret, never to text in an open picker. Hover over a formatting button to see its shortcut. Command-K remains Actions.
|
Formatting shortcuts use the same actions as the bottom strip. They apply to the editor’s current selection or caret, never to text in an open picker. Hover over a formatting button to see its shortcut. Command-K remains Actions.
|
||||||
|
|
||||||
|
|||||||
@@ -1184,6 +1184,9 @@ final class ApplicationCell: NSTableCellView {
|
|||||||
@MainActor
|
@MainActor
|
||||||
final class LauncherScrollView: NSScrollView {
|
final class LauncherScrollView: NSScrollView {
|
||||||
static let fadeHeight: CGFloat = 32
|
static let fadeHeight: CGFloat = 32
|
||||||
|
var edgeFadeHeight: CGFloat = LauncherScrollView.fadeHeight {
|
||||||
|
didSet { needsLayout = true }
|
||||||
|
}
|
||||||
private let edgeFade = CAGradientLayer()
|
private let edgeFade = CAGradientLayer()
|
||||||
|
|
||||||
override init(frame frameRect: NSRect) {
|
override init(frame frameRect: NSRect) {
|
||||||
@@ -1200,7 +1203,7 @@ final class LauncherScrollView: NSScrollView {
|
|||||||
|
|
||||||
override func layout() {
|
override func layout() {
|
||||||
super.layout()
|
super.layout()
|
||||||
let fade = min(0.5, Self.fadeHeight / max(bounds.height, 1))
|
let fade = min(0.5, edgeFadeHeight / max(bounds.height, 1))
|
||||||
CATransaction.begin()
|
CATransaction.begin()
|
||||||
CATransaction.setDisableActions(true)
|
CATransaction.setDisableActions(true)
|
||||||
edgeFade.frame = bounds
|
edgeFade.frame = bounds
|
||||||
|
|||||||
@@ -120,14 +120,15 @@ final class NotesController: NSViewController, NSTextViewDelegate {
|
|||||||
editor.textContainerInset = NSSize(width: 22, height: 8)
|
editor.textContainerInset = NSSize(width: 22, height: 8)
|
||||||
editor.setAccessibilityLabel("Note editor")
|
editor.setAccessibilityLabel("Note editor")
|
||||||
let scroll = LauncherScrollView()
|
let scroll = LauncherScrollView()
|
||||||
|
scroll.edgeFadeHeight = 16
|
||||||
scroll.documentView = editor
|
scroll.documentView = editor
|
||||||
scroll.hasVerticalScroller = true
|
scroll.hasVerticalScroller = true
|
||||||
scroll.autohidesScrollers = true
|
scroll.autohidesScrollers = true
|
||||||
scroll.drawsBackground = false
|
scroll.drawsBackground = false
|
||||||
scroll.scrollerStyle = .overlay
|
scroll.scrollerStyle = .overlay
|
||||||
scroll.automaticallyAdjustsContentInsets = false
|
scroll.automaticallyAdjustsContentInsets = false
|
||||||
scroll.contentInsets = NSEdgeInsets(top: LauncherScrollView.fadeHeight, left: 0,
|
scroll.contentInsets = NSEdgeInsets(top: scroll.edgeFadeHeight, left: 0,
|
||||||
bottom: LauncherScrollView.fadeHeight, right: 0)
|
bottom: scroll.edgeFadeHeight, right: 0)
|
||||||
status.font = .systemFont(ofSize: 12)
|
status.font = .systemFont(ofSize: 12)
|
||||||
status.textColor = SunsetPalette.secondaryText
|
status.textColor = SunsetPalette.secondaryText
|
||||||
status.setAccessibilityLabel("Notes save status")
|
status.setAccessibilityLabel("Notes save status")
|
||||||
|
|||||||
Reference in New Issue
Block a user