Skip to content
Cross platform GUI in Go based on Material Design
Go
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Move fyne to github spomnsors Feb 20, 2020
app Fix oversight where appID was not persisted in app Feb 3, 2020
canvas Add some safety around refreshing before app is created Nov 20, 2019
cmd Fix packaging failure on windows Feb 4, 2020
dialog Fix imports ordering Jan 20, 2020
driver Add virtual keyboard APIs to mobile specific device extension Jan 20, 2020
img Second attempt at #529 but without svg changes Nov 25, 2019
internal sorry, fix formatting Feb 6, 2020
layout Fix spelling to make report-card happy Jan 20, 2020
test Start work on relative scale factors Jan 21, 2020
theme regenerate bundled files Jan 20, 2020
tools Update to correctly set theme on playground render Sep 21, 2019
vendor Update to latest mobile fork, fixes compatibility issues Dec 4, 2019
widget Fix icon for extending as well Jan 23, 2020
.gitignore Add the Ability to Change Icon Color (#246) May 5, 2019
.travis.yml Consistent variable names Feb 6, 2020
AUTHORS Logo contrinutions noted :) Nov 28, 2019
CHANGELOG.md Fix oversight where appID was not persisted in app Feb 3, 2020
CODE_OF_CONDUCT.md Added full version of the code of conduct Feb 10, 2019
CONTRIBUTING.md Adding some broad strokes contributor guidance Jan 26, 2020
LICENSE Update LICENSE Sep 12, 2019
README-mobile.md Refinements in README-mobile.md to make Android setup simpler Jan 21, 2020
README.md GoDoc is slowly moving to pkg.go.dev Feb 19, 2020
app.go Actually quit mobile apps, but warn about usage of this. Dec 24, 2019
app_test.go Start work on an implementation of the Preferences portion of the set… Aug 26, 2019
canvas.go Complete deprecation of scale, the specific value is no longer read Jan 21, 2020
canvas_test.go Remove debug output Sep 3, 2018
canvasobject.go Move shortcuts to the event queue (#613) Jan 20, 2020
clipboard.go Add paste support to entry widget (#89) Feb 28, 2019
container.go don't refresh unless we have to Nov 24, 2019
container_test.go Add a universal CanvasObject.Refresh() that does the right thing. Nov 19, 2019
device.go Start work on relative scale factors Jan 21, 2020
driver.go Add a basic device API to adapt widgets and apps to the hardware Aug 23, 2019
event.go provide AbsolutePosition for fyne.PointEvent Nov 15, 2019
fyne.go Tweak godoc example Feb 13, 2019
geometry.go remove Size#FitsInto again Dec 3, 2019
geometry_test.go remove Size#FitsInto again Dec 3, 2019
go.mod Update to latest mobile fork, fixes compatibility issues Dec 4, 2019
go.sum Update to latest mobile fork, fixes compatibility issues Dec 4, 2019
key.go Add key processing and input handling for mobile apps. Oct 29, 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 Minor godoc tweaks Feb 15, 2019
math_test.go Fix project imports Dec 29, 2018
menu.go Add menus and a menubar for desktop apps May 17, 2019
menu_test.go Just a few tests (canvas/circle & fyne.Menu) (#275) May 28, 2019
preferences.go Add "...WithFallback" preferences functions to handle nil/missing con… Aug 27, 2019
resource.go Add NewImageFromURL and some helpers (#404) Sep 27, 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 Fix the overriding of FYNE_SCALE env Sep 22, 2019
shortcut.go Move shortcuts to the event queue (#613) Jan 20, 2020
shortcut_test.go Move shortcuts to the event queue (#613) Jan 20, 2020
text.go Minor godoc tweaks Feb 15, 2019
theme.go small scrollbar unless hovered Jun 8, 2019
widget.go Remove the ApplyTheme methods and Themeable interface Nov 19, 2019
window.go Don't set first window to be master automatically Sep 8, 2019

README.md

Go API Reference 1.2.2 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. It is designed to build applications that run on desktop and mobile devices with a single codebase.

Version 1.2 is the current release which added support for iOS and Android devices as well as providing much simpler ways to write custom widgets. We are now working towards 1.3 which will add data binding and some more advanced widgets such as tables and lists.

Prerequisites

To develop apps using Fyne you will need Go version 1.12 or later, a C compiler and your system's development tools. If you're not sure if that's all installed or you don't know how then check out our Getting Started document.

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

$ go get fyne.io/fyne

Widget demo

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

$ go get fyne.io/fyne/cmd/fyne_demo/
$ 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. If you have followed the prerequisite steps above then all you need is a Go IDE (or a text editor).

Open a new file and 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 pkg.go.dev.

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.