add(project): initial commit
This commit is contained in:
parent
f34565bf49
commit
cf17a4ec59
11 changed files with 628 additions and 0 deletions
29
internal/ui/about_page.go
Normal file
29
internal/ui/about_page.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"gioui.org/layout"
|
||||
"gioui.org/widget/material"
|
||||
)
|
||||
|
||||
type AboutPage struct {
|
||||
theme *material.Theme
|
||||
}
|
||||
|
||||
func NewAboutPage(theme *material.Theme) *AboutPage {
|
||||
return &AboutPage{
|
||||
theme: theme,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *AboutPage) Layout(gtx layout.Context) layout.Dimensions {
|
||||
return layout.UniformInset(16).Layout(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||
return layout.Flex{
|
||||
Axis: layout.Vertical,
|
||||
}.Layout(gtx,
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
body := material.Body1(p.theme, "This is a simple UI application built with Gio.")
|
||||
return body.Layout(gtx)
|
||||
}),
|
||||
)
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue