diff --git a/xkcdreader/app.go b/xkcdreader/app.go index 35492fb..89991a5 100644 --- a/xkcdreader/app.go +++ b/xkcdreader/app.go @@ -4,7 +4,9 @@ package xkcdreader import ( + "fmt" "log" + "time" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" @@ -77,7 +79,7 @@ func makeToolbar() *widget.Toolbar { func makeTabs() *container.AppTabs { tabs := container.NewAppTabs( - container.NewTabItem("xkcd comic", makeBrowseUI()), + container.NewTabItem("browse", makeBrowseUI()), container.NewTabItem("what if?", widget.NewLabel("serious answers to absurd questions and absurd advice for common concerns from xkcd's Randall Munroe")), container.NewTabItemWithIcon("search", theme.SearchIcon(), makeSearchTab()), ) @@ -98,12 +100,23 @@ func makeBrowseUI() *fyne.Container { log.Println("Next comic") })) - browseTabLabel := "Latest comic..." browseUI := container.New( layout.NewVBoxLayout(), - widget.NewLabel(browseTabLabel), layout.NewSpacer(), + container.NewCenter( + container.NewVBox( + &widget.Label{Text: "published on " + fmt.Sprint(time.Now().Date()), TextStyle: fyne.TextStyle{Italic: true}}, + container.NewHBox( + &widget.Label{Text: "Comic Title", TextStyle: fyne.TextStyle{Bold: true}}, + &widget.Label{Text: "(#1234)", TextStyle: fyne.TextStyle{Monospace: true}}, + ), + ), + ), imgC, + layout.NewSpacer(), + container.NewCenter( + &widget.Label{Text: "Comic 'title text'", TextStyle: fyne.TextStyle{Italic: true}}, + ), ) return browseUI