app: mv 'search' to a tab
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-05-25 19:33:13 +02:00
parent 325a1ca50d
commit 6372fd93fd
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 2 additions and 4 deletions

@ -63,9 +63,6 @@ func makeGreeting() *widget.Label {
func makeToolbar() *widget.Toolbar { func makeToolbar() *widget.Toolbar {
toolbar := widget.NewToolbar( toolbar := widget.NewToolbar(
widget.NewToolbarAction(theme.SearchIcon(), func() {
log.Println("Search")
}),
widget.NewToolbarSpacer(), widget.NewToolbarSpacer(),
widget.NewToolbarAction(theme.HelpIcon(), func() { widget.NewToolbarAction(theme.HelpIcon(), func() {
log.Println("Display help") log.Println("Display help")
@ -82,6 +79,7 @@ func makeTabs() *container.AppTabs {
tabs := container.NewAppTabs( tabs := container.NewAppTabs(
container.NewTabItem("xkcd comic", makeBrowseUI()), 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")), 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(), widget.NewEntry()),
) )
return tabs return tabs
} }

@ -19,7 +19,7 @@ func TestGreetingText(t *testing.T) {
} }
func TestToolbar(t *testing.T) { func TestToolbar(t *testing.T) {
wantItems := 5 wantItems := 4
gotToolbar := makeToolbar() gotToolbar := makeToolbar()
if len(gotToolbar.Items) != wantItems { if len(gotToolbar.Items) != wantItems {