fix: match notes scroll offsets to compact bars
This commit is contained in:
@@ -1184,6 +1184,9 @@ final class ApplicationCell: NSTableCellView {
|
||||
@MainActor
|
||||
final class LauncherScrollView: NSScrollView {
|
||||
static let fadeHeight: CGFloat = 32
|
||||
var edgeFadeHeight: CGFloat = LauncherScrollView.fadeHeight {
|
||||
didSet { needsLayout = true }
|
||||
}
|
||||
private let edgeFade = CAGradientLayer()
|
||||
|
||||
override init(frame frameRect: NSRect) {
|
||||
@@ -1200,7 +1203,7 @@ final class LauncherScrollView: NSScrollView {
|
||||
|
||||
override func 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.setDisableActions(true)
|
||||
edgeFade.frame = bounds
|
||||
|
||||
Reference in New Issue
Block a user