Skip to content

Commit

Permalink
Avoid naming collision
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 25, 2019
1 parent 3675a31 commit 0c9c88e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cmd/fyne_demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func confirmCallback(response bool) {
}

func main() {
app := app.New()
w := app.NewWindow("Fyne Demo")
a := app.New()
w := a.NewWindow("Fyne Demo")

cv := canvas.NewImageFromResource(theme.FyneLogo())
cv.SetMinSize(fyne.NewSize(64, 64))
Expand All @@ -69,11 +69,11 @@ func main() {
}),

widget.NewGroup("Demos",
widget.NewButton("Canvas", func() { Canvas(app) }),
widget.NewButton("Icons", func() { Icons(app) }),
widget.NewButton("Layout", func() { Layout(app) }),
widget.NewButton("Widgets", func() { Widget(app) }),
widget.NewButton("Form", func() { formApp(app) }),
widget.NewButton("Canvas", func() { Canvas(a) }),
widget.NewButton("Icons", func() { Icons(a) }),
widget.NewButton("Layout", func() { Layout(a) }),
widget.NewButton("Widgets", func() { Widget(a) }),
widget.NewButton("Form", func() { formApp(a) }),
),

widget.NewHBox(layout.NewSpacer(), cv, layout.NewSpacer()),
Expand Down Expand Up @@ -101,14 +101,14 @@ func main() {

fyne.NewContainerWithLayout(layout.NewGridLayout(2),
widget.NewButton("Dark", func() {
app.Settings().SetTheme(theme.DarkTheme())
a.Settings().SetTheme(theme.DarkTheme())
}),
widget.NewButton("Light", func() {
app.Settings().SetTheme(theme.LightTheme())
a.Settings().SetTheme(theme.LightTheme())
}),
),
widget.NewButtonWithIcon("Quit", theme.CancelIcon(), func() {
app.Quit()
a.Quit()
}),
))
w.ShowAndRun()
Expand Down

0 comments on commit 0c9c88e

Please sign in to comment.