app: mv 'search' to a tab
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
325a1ca50d
commit
6372fd93fd
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user