Skip to content

Commit

Permalink
0 theme size is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Jun 11, 2024
1 parent da8a60d commit 0796177
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ func (t *configurableTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
}

func (t *configurableTheme) Size(s fyne.ThemeSizeName) float32 {
if t.sizes[s] == 0 {
if _, ok := t.sizes[s]; !ok {
fyne.LogError(fmt.Sprintf("size %s not defined in theme %s", s, t.name), nil)
return 0
}

return t.sizes[s]
Expand Down

0 comments on commit 0796177

Please sign in to comment.