add more restrictions to year entry field in album filters

This commit is contained in:
Drew Weymouth
2023-05-18 08:56:55 -07:00
parent d7506ca630
commit bf4dce6df4
2 changed files with 9 additions and 1 deletions
+7
View File
@@ -32,6 +32,13 @@ func (e *TextRestrictedEntry) TypedRune(r rune) {
}
}
func (e *TextRestrictedEntry) TypedShortcut(s fyne.Shortcut) {
if s.ShortcutName() == (&fyne.ShortcutPaste{}).ShortcutName() {
return
}
e.TypedShortcut(s)
}
func (e *TextRestrictedEntry) SetMinCharWidth(numChars int) {
e.minWidth = theme.Padding()*2 + fyne.MeasureText(strings.Repeat("W", numChars),
fyne.CurrentApp().Settings().Theme().Size(theme.SizeNameText), e.TextStyle).Width