adjust style for macos.

This commit is contained in:
slam
2024-08-11 19:42:12 +08:00
parent c74ab643fa
commit 3fb80aa32c

View File

@@ -177,7 +177,11 @@ public struct EmojiPickerView: View {
} }
.padding(.horizontal) .padding(.horizontal)
} }
#if os(iOS)
.frame(maxHeight: .infinity) .frame(maxHeight: .infinity)
#else
.frame(maxHeight: 300)
#endif
.autocorrectionDisabled() .autocorrectionDisabled()
#if os(iOS) #if os(iOS)
.searchable(text: $search, placement: .navigationBarDrawer(displayMode: .always)) .searchable(text: $search, placement: .navigationBarDrawer(displayMode: .always))
@@ -196,6 +200,11 @@ public struct EmojiPickerView: View {
.stroke(Color.gray.opacity(0.2), lineWidth: 1) .stroke(Color.gray.opacity(0.2), lineWidth: 1)
} }
} }
#if os(macOS)
.background(Color(.windowBackgroundColor))
.cornerRadius(8)
.edgesIgnoringSafeArea(.bottom)
#endif
} }
} }