Skip to content

Commit

Permalink
Merge pull request #5558 from Jacalz/dynamic-array-size
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz authored Feb 26, 2025
2 parents cbb0fd3 + 7108d38 commit 0cc601e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/fyne_settings/settings/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type scaleItems struct {
button *widget.Button
}

var scales = []*scaleItems{
var scales = [...]*scaleItems{
{scale: 0.5, name: "Tiny"},
{scale: 0.8, name: "Small"},
{scale: 1, name: "Normal"},
Expand Down
2 changes: 1 addition & 1 deletion internal/painter/gl/gl_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type (
Uniform int32
)

var textureFilterToGL = []int32{gl.LINEAR, gl.NEAREST, gl.LINEAR}
var textureFilterToGL = [...]int32{gl.LINEAR, gl.NEAREST, gl.LINEAR}

func (p *painter) Init() {
p.ctx = &coreContext{}
Expand Down
2 changes: 1 addition & 1 deletion internal/painter/gl/gl_es.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type (
Uniform int32
)

var textureFilterToGL = []int32{gl.LINEAR, gl.NEAREST, gl.LINEAR}
var textureFilterToGL = [...]int32{gl.LINEAR, gl.NEAREST, gl.LINEAR}

func (p *painter) Init() {
p.ctx = &esContext{}
Expand Down
2 changes: 1 addition & 1 deletion internal/painter/gl/gl_gomobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type (
var compiled []Program // avoid multiple compilations with the re-used mobile GUI context
var noBuffer = Buffer{}
var noShader = Shader{}
var textureFilterToGL = []int32{gl.Linear, gl.Nearest}
var textureFilterToGL = [...]int32{gl.Linear, gl.Nearest}

func (p *painter) glctx() gl.Context {
return p.contextProvider.Context().(gl.Context)
Expand Down
2 changes: 1 addition & 1 deletion internal/painter/gl/gl_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type (

var noBuffer = Buffer(gl.NoBuffer)
var noShader = Shader(gl.NoShader)
var textureFilterToGL = []int32{gl.LINEAR, gl.NEAREST}
var textureFilterToGL = [...]int32{gl.LINEAR, gl.NEAREST}

func (p *painter) Init() {
p.ctx = &xjsContext{}
Expand Down
2 changes: 1 addition & 1 deletion test/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
var defaultTheme fyne.Theme

// Try to keep these in sync with the existing color names at theme/color.go.
var knownColorNames = []fyne.ThemeColorName{
var knownColorNames = [...]fyne.ThemeColorName{
theme.ColorNameBackground,
theme.ColorNameButton,
theme.ColorNameDisabled,
Expand Down

0 comments on commit 0cc601e

Please sign in to comment.