From 0796177616af536c27471afa375d38d37f01e323 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Mon, 10 Jun 2024 17:49:27 -0700 Subject: [PATCH] 0 theme size is valid --- test/theme.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/theme.go b/test/theme.go index e44d928973..39488da140 100644 --- a/test/theme.go +++ b/test/theme.go @@ -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]