Skip to content

Commit

Permalink
Remove custom bundler scripts and rebundle with latest fyne bundle (#…
Browse files Browse the repository at this point in the history
…1898)

This removes the `gen.go` custom bundle scripts that were used in `cmd/fyne_demo` and `cmd/fyne_demo` in favour of using `go:generate` in combination with `fyne bundle`.
The only remaining custom bundle script is the one in the theme package, but that requires a lot more work due to the fonts combined with the ammount of icons.
  • Loading branch information
Jacalz committed Feb 3, 2021
1 parent 9a0f87c commit 4aac2eb
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 138 deletions.
File renamed without changes
File renamed without changes
14 changes: 0 additions & 14 deletions cmd/fyne_demo/data/bundled-scene.go

This file was deleted.

15 changes: 15 additions & 0 deletions cmd/fyne_demo/data/bundled.go

Large diffs are not rendered by default.

57 changes: 0 additions & 57 deletions cmd/fyne_demo/data/gen.go

This file was deleted.

4 changes: 3 additions & 1 deletion cmd/fyne_demo/data/icons.go
@@ -1,5 +1,7 @@
package data

//go:generate fyne bundle -package data -o bundled.go assets

import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
Expand Down Expand Up @@ -38,4 +40,4 @@ func NewThemedResource(dark, light fyne.Resource) *ThemedResource {
}

// FyneScene contains the full fyne logo with background design
var FyneScene = NewThemedResource(fynescenedark, fynescenelight)
var FyneScene = NewThemedResource(resourceFynescenedarkPng, resourceFynescenelightPng)
File renamed without changes
File renamed without changes
4 changes: 4 additions & 0 deletions cmd/fyne_settings/data/data.go
@@ -0,0 +1,4 @@
package data

// TODO: Bundle the folder instead of the file when we have language support.
//go:generate fyne bundle -package settings -o ../settings/bundled.go assets/appearance.svg
60 changes: 0 additions & 60 deletions cmd/fyne_settings/data/gen.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/fyne_settings/settings/appearance.go
Expand Up @@ -42,7 +42,7 @@ func NewSettings() *Settings {

// AppearanceIcon returns the icon for appearance settings
func (s *Settings) AppearanceIcon() fyne.Resource {
return theme.NewThemedResource(appearanceIcon)
return theme.NewThemedResource(resourceAppearanceSvg)
}

// LoadAppearanceScreen creates a new settings screen to handle appearance configuration
Expand Down
11 changes: 6 additions & 5 deletions cmd/fyne_settings/settings/bundled.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4aac2eb

Please sign in to comment.