Skip to content

Commit

Permalink
Merge branch 'doubleTapFix' of https://github.com/okratitan/fyne into…
Browse files Browse the repository at this point in the history
… doubleTapFix
  • Loading branch information
okratitan committed Oct 10, 2020
2 parents f91191c + b3ad7b9 commit b55408c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
1 change: 0 additions & 1 deletion cmd/fyne/env.go
Expand Up @@ -39,7 +39,6 @@ func (v *env) main() {
reporters := []goinfo.Reporter{
&fyneReport{GoMod: &report.GoMod{WorkDir: workDir, Module: fyneModule}},
&report.GoVersion{},
&report.OS{},
&report.GoEnv{Filter: []string{"GOOS", "GOARCH", "CGO_ENABLED", "GO111MODULE"}},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/fyne/install.go
Expand Up @@ -62,7 +62,7 @@ func (i *installer) install() error {
switch p.os {
case "darwin":
i.installDir = "/Applications"
case "linux":
case "linux", "openbsd", "freebsd", "netbsd":
i.installDir = "/" // the tarball contains the structure starting at usr/local
case "windows":
i.installDir = filepath.Join(os.Getenv("ProgramFiles"), p.name)
Expand Down
27 changes: 13 additions & 14 deletions cmd/fyne/package.go
Expand Up @@ -140,18 +140,17 @@ func (p *packager) packageLinux() error {
defer os.RemoveAll(filepath.Join(p.dir, tempDir))

makefile, _ := os.Create(filepath.Join(p.dir, tempDir, "Makefile"))
_, err := io.WriteString(makefile, `ifneq ("$(wildcard /usr/local)","")`+"\n"+
"PREFIX ?= /usr/local\n"+
"else\n"+
"PREFIX ?= /usr\n"+
"endif\n"+
"\n"+
"default:\n"+
` # Run "sudo make install" to install the application.`+"\n"+
"install:\n"+
" install -Dm00644 usr/"+local+"share/applications/"+p.name+`.desktop $(DESTDIR)$(PREFIX)/share/applications/`+p.name+".desktop\n"+
" install -Dm00755 usr/"+local+"bin/"+filepath.Base(p.exe)+` $(DESTDIR)$(PREFIX)/bin/`+filepath.Base(p.exe)+"\n"+
" install -Dm00644 usr/"+local+"share/pixmaps/"+p.name+filepath.Ext(p.icon)+` $(DESTDIR)$(PREFIX)/share/pixmaps/`+p.name+filepath.Ext(p.icon)+"\n")
_, err := io.WriteString(makefile,
`LOCAL != test -d /usr/local && echo -n "/local" || echo -n ""`+"\n"+
`LOCAL ?= $(shell test -d /usr/local && echo "/local" || echo "")`+"\n"+
"PREFIX ?= /usr$(LOCAL)\n"+
"\n"+
"default:\n"+
` # Run "sudo make install" to install the application.`+"\n"+
"install:\n"+
" install -Dm00644 usr/"+local+"share/applications/"+p.name+`.desktop $(DESTDIR)$(PREFIX)/share/applications/`+p.name+".desktop\n"+
" install -Dm00755 usr/"+local+"bin/"+filepath.Base(p.exe)+` $(DESTDIR)$(PREFIX)/bin/`+filepath.Base(p.exe)+"\n"+
" install -Dm00644 usr/"+local+"share/pixmaps/"+p.name+filepath.Ext(p.icon)+` $(DESTDIR)$(PREFIX)/share/pixmaps/`+p.name+filepath.Ext(p.icon)+"\n")
if err != nil {
return errors.Wrap(err, "Failed to write Makefile string")
}
Expand Down Expand Up @@ -336,7 +335,7 @@ func (p *packager) packageIOS() error {
}

func (p *packager) addFlags() {
flag.StringVar(&p.os, "os", "", "The operating system to target (android, android/arm, android/arm64, android/amd64, android/386, darwin, ios, linux, windows)")
flag.StringVar(&p.os, "os", "", "The operating system to target (android, android/arm, android/arm64, android/amd64, android/386, darwin, freebsd, ios, linux, netbsd, openbsd, windows)")
flag.StringVar(&p.exe, "executable", "", "The path to the executable, default is the current dir main binary")
flag.StringVar(&p.srcDir, "sourceDir", "", "The directory to package, if executable is not set")
flag.StringVar(&p.name, "name", "", "The name of the application, default is the executable file name")
Expand Down Expand Up @@ -459,7 +458,7 @@ func (p *packager) doPackage() error {
switch p.os {
case "darwin":
return p.packageDarwin()
case "linux":
case "linux", "openbsd", "freebsd", "netbsd":
return p.packageLinux()
case "windows":
return p.packageWindows()
Expand Down
4 changes: 4 additions & 0 deletions widget.go
Expand Up @@ -18,6 +18,10 @@ type Widget interface {
// function and should be exactly one instance per widget in memory.
type WidgetRenderer interface {
// BackgroundColor returns the color that should be used to draw the background of this renderer’s widget.
//
// Deprecated: Widgets will no longer have a background to support hover and selection indication in collection widgets.
// If a widget requires a background color or image, this can be achieved by using a canvas.Rect or canvas.Image
// as the first child of a MaxLayout, followed by the rest of the widget components.
BackgroundColor() color.Color
// Destroy is for internal use.
Destroy()
Expand Down

0 comments on commit b55408c

Please sign in to comment.