From 3fb80aa32c68c21ec288470a7b3db1a244b96b4b Mon Sep 17 00:00:00 2001 From: slam Date: Sun, 11 Aug 2024 19:42:12 +0800 Subject: [PATCH] adjust style for macos. --- Sources/EmojiPicker/EmojiPickerView.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sources/EmojiPicker/EmojiPickerView.swift b/Sources/EmojiPicker/EmojiPickerView.swift index 5e0f135..335771b 100644 --- a/Sources/EmojiPicker/EmojiPickerView.swift +++ b/Sources/EmojiPicker/EmojiPickerView.swift @@ -177,7 +177,11 @@ public struct EmojiPickerView: View { } .padding(.horizontal) } + #if os(iOS) .frame(maxHeight: .infinity) + #else + .frame(maxHeight: 300) + #endif .autocorrectionDisabled() #if os(iOS) .searchable(text: $search, placement: .navigationBarDrawer(displayMode: .always)) @@ -196,6 +200,11 @@ public struct EmojiPickerView: View { .stroke(Color.gray.opacity(0.2), lineWidth: 1) } } + #if os(macOS) + .background(Color(.windowBackgroundColor)) + .cornerRadius(8) + .edgesIgnoringSafeArea(.bottom) + #endif } }