ui: increase size of the hitbox on note ellipsis button

Changelog-Changed: Increase size of the hitbox on note ellipsis button
Closes: https://github.com/damus-io/damus/issues/1454
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Daniel D’Aquino
2023-09-16 05:37:04 +00:00
committed by William Casarin
parent 01b8e43a6e
commit bfda0d1b74

View File

@@ -26,12 +26,19 @@ struct EventMenuContext: View {
var body: some View { var body: some View {
HStack { HStack {
Menu { Label("", systemImage: "ellipsis")
MenuItems(event: event, keypair: keypair, target_pubkey: target_pubkey, bookmarks: bookmarks, muted_threads: muted_threads, settings: settings) .foregroundColor(Color.gray)
} label: { .contentShape(Circle())
Label("", systemImage: "ellipsis") // Add our Menu button inside an overlay modifier to avoid affecting the rest of the layout around us.
.foregroundColor(Color.gray) .overlay(
} Menu {
MenuItems(event: event, keypair: keypair, target_pubkey: target_pubkey, bookmarks: bookmarks, muted_threads: muted_threads, settings: settings)
} label: {
Color.clear
}
// Hitbox frame size
.frame(width: 100, height: 70)
)
} }
.padding([.bottom], 4) .padding([.bottom], 4)
.contentShape(Rectangle()) .contentShape(Rectangle())