diff --git a/xkcdreader/app.go b/xkcdreader/app.go index acb1c10..a1ad83a 100644 --- a/xkcdreader/app.go +++ b/xkcdreader/app.go @@ -65,8 +65,33 @@ func makeToolbar() *widget.Toolbar { func makeTabs() *container.AppTabs { tabs := container.NewAppTabs( - container.NewTabItem("xkcd comic", widget.NewLabel("Latest comic...")), + container.NewTabItem("xkcd comic", makeBrowseUI()), container.NewTabItem("what if?", widget.NewLabel("serious answers to absurd questions and absurd advice for common concerns from xkcd's Randall Munroe")), ) return tabs } + +func makeBrowseUI() *fyne.Container { + // container for the image and surrounding elements + imgC := container.New( + layout.NewHBoxLayout(), + widget.NewButton("previous", func() { + log.Println("Previous comic") + }), + layout.NewSpacer(), + widget.NewLabel("img placeholder"), + layout.NewSpacer(), + widget.NewButton("next", func() { + log.Println("Next comic") + })) + + browseTabLabel := "Latest comic..." + browseUI := container.New( + layout.NewVBoxLayout(), + widget.NewLabel(browseTabLabel), + layout.NewSpacer(), + imgC, + ) + + return browseUI +}