Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize and use Go 1.19 as base #100

Merged
merged 11 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/platform_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.17.x', '1.21.x']
go-version: ['1.19.x', 'stable']
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.13.0
- uses: WillAbides/setup-go-faster@v1
with:
go-version: ${{ matrix.go-version }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: WillAbides/setup-go-faster@v1.13.0
- uses: WillAbides/setup-go-faster@v1
with:
go-version: '1.21.x'
go-version: 'stable'

- name: Get dependencies
run: >-
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.4.6
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1
go install github.com/mattn/goveralls@latest

- name: Vet
Expand All @@ -53,7 +53,7 @@ jobs:
set -e
xvfb-run go test -covermode=atomic -coverprofile=coverage.out ./...
coverage=`go tool cover -func coverage.out | grep total | tr -s '\t' | cut -f 3 | grep -o '[^%]*'`
if (( $(echo "$coverage < 48" | bc) )); then echo "Test coverage lowered"; exit 1; fi
if (( $(echo "$coverage < 44" | bc) )); then echo "Test coverage lowered"; exit 1; fi

- name: Update PR Coverage
uses: shogo82148/actions-goveralls@v1
Expand Down
12 changes: 6 additions & 6 deletions dialog/about.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ func aboutContent(content string, links []*widget.Hyperlink, a fyne.App) fyne.Ca
container.NewCenter(rich))
scroll := container.NewScroll(body)

bgColor := withAlpha(theme.BackgroundColor(), 0xe0)
shadowColor := withAlpha(theme.BackgroundColor(), 0x33)
bgColor := withAlpha(theme.Color(theme.ColorNameBackground), 0xe0)
shadowColor := withAlpha(theme.Color(theme.ColorNameBackground), 0x33)

underlay := canvas.NewImageFromResource(a.Metadata().Icon)
bg := canvas.NewRectangle(bgColor)
underlayer := underLayout{}
slideBG := container.New(underlayer, underlay)
footerBG := canvas.NewRectangle(shadowColor)
watchTheme(bg, footerBG, a)
watchTheme(bg, footerBG)

underlay.Resize(fyne.NewSize(512, 512))
scroll.OnScrolled = func(p fyne.Position) {
Expand Down Expand Up @@ -112,16 +112,16 @@ func centerText(rich *widget.RichText) {
}
}

func watchTheme(bg, footer *canvas.Rectangle, a fyne.App) {
func watchTheme(bg, footer *canvas.Rectangle) {
listen := make(chan fyne.Settings)
fyne.CurrentApp().Settings().AddChangeListener(listen)
go func() {
for range listen {
bgColor := withAlpha(theme.BackgroundColor(), 0xe0)
bgColor := withAlpha(theme.Color(theme.ColorNameBackground), 0xe0)
bg.FillColor = bgColor
bg.Refresh()

shadowColor := withAlpha(theme.BackgroundColor(), 0x33)
shadowColor := withAlpha(theme.Color(theme.ColorNameBackground), 0x33)
footer.FillColor = shadowColor
footer.Refresh()
}
Expand Down
43 changes: 22 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
module fyne.io/x/fyne

go 1.17
go 1.19

require (
fyne.io/fyne/v2 v2.4.3
github.com/Andrew-M-C/go.jsonvalue v1.1.2-0.20211223013816-e873b56b4a84
fyne.io/fyne/v2 v2.5.3
github.com/Andrew-M-C/go.jsonvalue v1.4.1
github.com/eclipse/paho.mqtt.golang v1.3.5
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.5.3
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
github.com/stretchr/testify v1.8.4
github.com/twpayne/go-geom v1.0.0
github.com/wagslane/go-password-validator v0.3.0
golang.org/x/image v0.11.0
golang.org/x/image v0.23.0
)

require (
fyne.io/systray v1.10.1-0.20231115130155-104f5ef7839e // indirect
fyne.io/systray v1.11.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fredbi/uri v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fredbi/uri v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 // indirect
github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0 // indirect
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b // indirect
github.com/go-text/render v0.0.0-20230619120952-35bccb6164b8 // indirect
github.com/go-text/typesetting v0.0.0-20230616162802-9c17dd34aa4a // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect
github.com/go-text/render v0.2.0 // indirect
github.com/go-text/typesetting v0.2.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 // indirect
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rymdport/portal v0.3.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
github.com/tevino/abool v1.2.0 // indirect
github.com/yuin/goldmark v1.5.5 // indirect
golang.org/x/mobile v0.0.0-20230531173138-3c911d8e3eda // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
github.com/yuin/goldmark v1.7.1 // indirect
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2 // indirect
)
Loading
Loading