fix tap events for gridview

This commit is contained in:
Drew Weymouth
2023-05-23 19:03:44 -07:00
parent 90936c086d
commit c5b8e0e3f7
6 changed files with 26 additions and 18 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ func NewNowPlayingCard() *NowPlayingCard {
return n
}
func (n *NowPlayingCard) onShowCoverImage() {
func (n *NowPlayingCard) onShowCoverImage(*fyne.PointEvent) {
if n.OnShowCoverImage != nil {
n.OnShowCoverImage()
}
@@ -107,7 +107,7 @@ func (n *NowPlayingCard) OnTrackNameTapped(f func()) {
n.trackName.OnTapped = f
}
func (n *NowPlayingCard) showMenu(pos fyne.Position) {
func (n *NowPlayingCard) showMenu(e *fyne.PointEvent) {
if n.menu == nil {
ratingMenu := util.NewRatingSubmenu(n.onSetRating)
m := fyne.NewMenu("",
@@ -117,5 +117,5 @@ func (n *NowPlayingCard) showMenu(pos fyne.Position) {
fyne.NewMenuItem("Add to playlist...", func() { n.onAddToPlaylist() }))
n.menu = widget.NewPopUpMenu(m, fyne.CurrentApp().Driver().CanvasForObject(n))
}
n.menu.ShowAtPosition(pos)
n.menu.ShowAtPosition(e.AbsolutePosition)
}