41 lines
781 B
Go
41 lines
781 B
Go
package ui
|
|
|
|
import (
|
|
"go_dreamfactory/cmd/v2/lib/common"
|
|
"go_dreamfactory/cmd/v2/service/observer"
|
|
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/theme"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
type appWelcome struct {
|
|
appAdapter
|
|
}
|
|
|
|
func (a *appWelcome) LazyInit(obs observer.Observer) error {
|
|
|
|
a.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_WELCOME, theme.ComputerIcon(), nil)
|
|
|
|
a.tabItem.Content = container.NewCenter(
|
|
container.NewVBox(
|
|
widget.NewLabelWithStyle(common.TOOLBAR_WELCOME,
|
|
fyne.TextAlignCenter,
|
|
fyne.TextStyle{Bold: true})),
|
|
)
|
|
return nil
|
|
}
|
|
|
|
func (a *appWelcome) OpenDefault() bool {
|
|
return true
|
|
}
|
|
|
|
func (a *appWelcome) GetAppName() string {
|
|
return common.TOOLBAR_WELCOME
|
|
}
|
|
|
|
func (a appWelcome) OnClose() bool {
|
|
return false
|
|
}
|