| 1234567891011121314 |
- import AppKit
- import SwiftUI
- func makeWidgetsPageHost(canAddWidgets: Bool, onAddBlocked: @escaping () -> Void) -> NSView {
- let host = NSHostingView(
- rootView: WidgetsRootView(
- canAddWidgets: canAddWidgets,
- onAddBlocked: onAddBlocked
- )
- )
- host.translatesAutoresizingMaskIntoConstraints = false
- return host
- }
|