Skip to content

Commit

Permalink
Make it work with extended entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz authored and andydotxyz committed Jul 27, 2021
1 parent 566d72a commit e75e51c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions widget/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,19 +495,19 @@ func (e *Entry) TappedSecondary(pe *fyne.PointEvent) {
}

clipboard := fyne.CurrentApp().Driver().AllWindows()[0].Clipboard()
super := e.super()

cutItem := fyne.NewMenuItem("Cut", func() {
e.TypedShortcut(&fyne.ShortcutCut{Clipboard: clipboard})
super.(fyne.Shortcutable).TypedShortcut(&fyne.ShortcutCut{Clipboard: clipboard})
})
copyItem := fyne.NewMenuItem("Copy", func() {
e.TypedShortcut(&fyne.ShortcutCopy{Clipboard: clipboard})
super.(fyne.Shortcutable).TypedShortcut(&fyne.ShortcutCopy{Clipboard: clipboard})
})
pasteItem := fyne.NewMenuItem("Paste", func() {
e.TypedShortcut(&fyne.ShortcutPaste{Clipboard: clipboard})
super.(fyne.Shortcutable).TypedShortcut(&fyne.ShortcutPaste{Clipboard: clipboard})
})
selectAllItem := fyne.NewMenuItem("Select all", e.selectAll)

super := e.super()
entryPos := fyne.CurrentApp().Driver().AbsolutePositionForObject(super)
popUpPos := entryPos.Add(fyne.NewPos(pe.Position.X, pe.Position.Y))
c := fyne.CurrentApp().Driver().CanvasForObject(super)
Expand Down

0 comments on commit e75e51c

Please sign in to comment.