I decided to rewrite the program taking into account the experience gained.
34 lines
654 B
Go
34 lines
654 B
Go
package view
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/lang"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
func Convertor() fyne.CanvasObject {
|
|
form := newFormConvertor()
|
|
|
|
converterVideoFilesTitle := lang.L("converterVideoFilesTitle")
|
|
return widget.NewCard(converterVideoFilesTitle, "", container.NewVScroll(form.getForm()))
|
|
}
|
|
|
|
type formConvertor struct {
|
|
form *widget.Form
|
|
items []*widget.FormItem
|
|
}
|
|
|
|
func newFormConvertor() *formConvertor {
|
|
f := widget.NewForm()
|
|
f.SubmitText = lang.L("converterVideoFilesSubmitTitle")
|
|
|
|
return &formConvertor{
|
|
form: f,
|
|
}
|
|
}
|
|
|
|
func (f *formConvertor) getForm() *widget.Form {
|
|
return f.form
|
|
}
|