This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-05-04 20:02:37 +03:00
parent 750d88f728
commit f9e8ff40a6
6 changed files with 43 additions and 43 deletions

View File

@ -17,8 +17,6 @@ type (
filters []event.Filter
requestFocus bool
}
EditorStyle material.EditorStyle
)
func NewEditor(e widget.Editor) *Editor {
@ -36,8 +34,12 @@ func NewEditor(e widget.Editor) *Editor {
return ret
}
func MaterialEditor(th *material.Theme, e *Editor, hint string) EditorStyle {
return EditorStyle(material.Editor(th, &e.Editor, hint))
func MaterialEditor(th *Theme, style *LabelStyle, editor *Editor, hint string) material.EditorStyle {
ret := material.Editor(&th.Material, &editor.Editor, hint)
ret.Font = style.Font
ret.TextSize = style.TextSize
ret.Color = style.Color
return ret
}
func (e *Editor) SetText(s string) {
@ -80,7 +82,3 @@ func (e *Editor) Cancelled(gtx C) bool {
func (e *Editor) Focus() {
e.requestFocus = true
}
func (e *EditorStyle) Layout(gtx C) D {
return material.EditorStyle(*e).Layout(gtx)
}