Skip to content
Cross platform GUI in Go based on Material Design
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Add appropriate locks to avoid race in settings and font cache Apr 15, 2019
canvas Add a little comment for the private field Mar 19, 2019
cmd Rewrite if-else-if-else to switch statements Mar 25, 2019
dialog Fix possible crash on dialog Mar 30, 2019
driver Again disable GL tests on Travis Apr 22, 2019
img Update demo screenshots Apr 20, 2019
layout Stretch form content elements width if the container grows Jan 9, 2019
scripts/modvendor
test Unfocus the currently focused object when another object is clicked Mar 23, 2019
theme Improve error handling (#152) Mar 16, 2019
vendor Add support for go modules (#153) Apr 2, 2019
widget Merge branch 'master' into develop Apr 19, 2019
.gitignore
.travis.yml Travis should be OK as a go release fixed this Apr 12, 2019
AUTHORS add link to website in demo Jan 30, 2019
CODE_OF_CONDUCT.md Added full version of the code of conduct Feb 10, 2019
LICENSE Add BSD license Feb 24, 2018
README.md Update README for release Apr 21, 2019
app.go Minor godoc tweaks Feb 15, 2019
app_test.go Remove dead code and add missing tests Mar 7, 2019
canvas.go Unfocus the currently focused object when another object is clicked Mar 23, 2019
canvas_test.go Remove debug output Sep 3, 2018
canvasobject.go
clipboard.go Add paste support to entry widget (#89) Feb 28, 2019
container.go
container_test.go Fix project imports Dec 29, 2018
driver.go Minor godoc tweaks Feb 15, 2019
event.go Minor godoc tweaks Feb 15, 2019
fyne.go Tweak godoc example Feb 13, 2019
geometry.go Minor godoc tweaks Feb 15, 2019
geometry_test.go Fix project imports Dec 29, 2018
go.mod Add support for go modules (#153) Apr 2, 2019
go.sum Add support for go modules (#153) Apr 2, 2019
key.go Add paste support to entry widget (#89) Feb 28, 2019
layout.go Minor godoc tweaks Feb 15, 2019
log.go Improve error handling (#152) Mar 16, 2019
log_test.go Improve error handling (#152) Mar 16, 2019
math.go
math_test.go Fix project imports Dec 29, 2018
resource.go Remove the now not needed Resource.CachePath Feb 20, 2019
resource_test.go Remove the now not needed Resource.CachePath Feb 20, 2019
serialise.go Remove the now not needed Resource.CachePath Feb 20, 2019
serialise_test.go Remove the now not needed Resource.CachePath Feb 20, 2019
settings.go
shortcut.go
shortcut_test.go Add more tests :) Mar 16, 2019
text.go
theme.go Add scroll bar to ScrollContainer Feb 24, 2019
widget.go Clean up widgets when they are no longer needed (#151) Mar 15, 2019
window.go Re-focus a parent window when dialog closes Mar 7, 2019

README.md

GoDoc Reference 1.0.1 release Join us on Slack Support Fyne.io
Code Status Build Status Coverage Status

About

Fyne is an easy to use UI toolkit and app API written in Go. We use OpenGL (through the go-gl and go-glfw projects) to provide cross platform graphics.

Version 1.0.1 is the current release which was a bugfix and stability releae. We are now working towards 1.1 which will add new functionality.

Widget demo

To run a showcase of the features of Fyne execute the following:

cd $GOPATH/src/fyne.io/fyne/cmd/fyne_demo/
go build
./fyne_demo

And you should see something like this (after you click a few buttons):

Fyne Hello Light Theme

Or if you are using the light theme:

Fyne Hello Light Theme

Getting Started

Fyne is designed to be really easy to code with. Here are the steps to your first app.

Prerequisites

As Fyne uses CGo you will require a C compiler (typically gcc). If you don't have one set up the instructions at Compiling may help.

By default Fyne uses the gl golang bindings which means you need a working OpenGL configuration. Debian/Ubuntu based systems may also need to install the libgl1-mesa-dev and xorg-dev packages.

Using the standard go tools you can install Fyne's core library using:

go get fyne.io/fyne

Code

And then you're ready to write your first app!

package main

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

func main() {
	app := app.New()

	w := app.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel("Hello Fyne!"),
		widget.NewButton("Quit", func() {
			app.Quit()
		}),
	))

	w.ShowAndRun()
}

And you can run that simply as:

go run main.go

It should look like this:

Fyne Hello Dark Theme

Note that Windows applications load from a command prompt by default, which means if you click an icon you may see a command window. To fix this add the parameters -ldflags -H=windowsgui to your run or build commands.

Documentation

More documentation is available at the Fyne developer website or on godoc.org.

Examples

You can find many example applications in the examples repository. Alternatively a list of applications using fyne can be found at our website

You can’t perform that action at this time.