Refactor application structure and initialize core components
I decided to rewrite the program taking into account the experience gained.
This commit is contained in:
33
internal/gui/view/convertor.go
Normal file
33
internal/gui/view/convertor.go
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user