mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-14 14:08:22 +08:00
temporary disable 2.5.0 entry redo/undo
This commit is contained in:
14
gui/xfyne/patch.go
Normal file
14
gui/xfyne/patch.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package xfyne
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func EntryDisableUndoRedo(entry *widget.Entry) *widget.Entry {
|
||||
val := reflect.ValueOf(entry).Elem().FieldByName("shortcut").Addr().UnsafePointer()
|
||||
(*fyne.ShortcutHandler)(val).RemoveShortcut(&fyne.ShortcutRedo{})
|
||||
(*fyne.ShortcutHandler)(val).RemoveShortcut(&fyne.ShortcutUndo{})
|
||||
return entry
|
||||
}
|
||||
Reference in New Issue
Block a user