From 2944ea3c63ec2074b61dfc2f00ac1ab37139cd78 Mon Sep 17 00:00:00 2001 From: KrLite Date: Tue, 17 Dec 2024 20:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20frames=20not=20applied?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Luminare/Main Window/LuminareWindow.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/Luminare/Main Window/LuminareWindow.swift b/Sources/Luminare/Main Window/LuminareWindow.swift index 76bffa0..c90f08e 100644 --- a/Sources/Luminare/Main Window/LuminareWindow.swift +++ b/Sources/Luminare/Main Window/LuminareWindow.swift @@ -18,8 +18,8 @@ public class LuminareWindow: NSWindow { /// - content: the content view of the window, wrapped in a ``LuminareView``. public init( blurRadius: CGFloat? = nil, - minFrame _: CGSize = .init(width: 100, height: 100), - maxFrame _: CGSize = .init(width: CGFloat.infinity, height: CGFloat.infinity), + minFrame: CGSize = .init(width: 100, height: 100), + maxFrame: CGSize = .init(width: CGFloat.infinity, height: CGFloat.infinity), content: @escaping () -> some View ) { self.initializationTime = .now @@ -34,6 +34,8 @@ public class LuminareWindow: NSWindow { let view = NSHostingView( rootView: LuminareView(content: content) .environment(\.luminareWindow, self) + .environment(\.luminareWindowMinFrame, minFrame) + .environment(\.luminareWindowMaxFrame, maxFrame) ) contentView = view