A collection of user interface components and drawing routines for building tasteful apps using AppKit.
appkit swift aqua ui mac

Make some functions static

+4 -4
+4 -4
Sources/AquaKit/Scroll Views/AquaScrollState.swift
··· 24 24 } 25 25 26 26 public var verticalOverscroll: CGFloat { 27 - absoluteExcess(of: scrollPosition.y, in: 0..<maxOffset.height) 27 + Self.absoluteExcess(of: scrollPosition.y, in: 0..<maxOffset.height) 28 28 } 29 29 30 - public func absoluteExcess(of position: CGFloat, in range: Range<CGFloat>) -> CGFloat { 30 + public static func absoluteExcess(of position: CGFloat, in range: Range<CGFloat>) -> CGFloat { 31 31 if position < range.lowerBound { 32 32 range.lowerBound - position 33 33 } else if position > range.upperBound { ··· 37 37 } 38 38 } 39 39 40 - public func absoluteExcess(of point: NSPoint, in size: NSSize) -> NSSize { 40 + public static func absoluteExcess(of point: NSPoint, in size: NSSize) -> NSSize { 41 41 NSSize( 42 42 width: absoluteExcess(of: point.x, in: 0..<size.width), 43 43 height: absoluteExcess(of: point.y, in: 0..<size.height) ··· 45 45 } 46 46 47 47 public var effectiveContentSize: NSSize { 48 - contentSize + absoluteExcess(of: scrollPosition, in: maxOffset) 48 + contentSize + Self.absoluteExcess(of: scrollPosition, in: maxOffset) 49 49 } 50 50 } 51 51