Skip to content

Commit

Permalink
Converge on a better cross-platform hello app
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jun 30, 2020
1 parent 77532fa commit fce4b1f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions cmd/hello/main.go
Expand Up @@ -2,20 +2,20 @@
package main

import (
"net/url"

"fyne.io/fyne/app"
"fyne.io/fyne/widget"
)

func main() {
a := app.New()
tourURL, _ := url.Parse("https://tour.fyne.io")

w := a.NewWindow("Hello")

hello := widget.NewLabel("Hello Fyne!")
w.SetContent(widget.NewVBox(
widget.NewLabel("Hello Fyne!"),
widget.NewHyperlink("tour.fyne.io", tourURL),
hello,
widget.NewButton("Hi!", func() {
hello.SetText("Welcome :)")
}),
))

w.ShowAndRun()
Expand Down
12 changes: 7 additions & 5 deletions fyne.go
Expand Up @@ -12,13 +12,15 @@
//
// func main() {
// a := app.New()
//
// w := a.NewWindow("Hello")
//
// hello := widget.NewLabel("Hello Fyne!")
// w.SetContent(widget.NewVBox(
// widget.NewLabel("Hello Fyne!"),
// widget.NewButton("Quit", func() {
// a.Quit()
// })))
// hello,
// widget.NewButton("Hi!", func() {
// hello.SetText("Welcome :)")
// }),
// ))
//
// w.ShowAndRun()
// }
Expand Down

0 comments on commit fce4b1f

Please sign in to comment.