Skip to content

Commit

Permalink
Correct the toolbar list decode
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Mar 3, 2024
1 parent 5a56d56 commit 3716d09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/gui/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ func decodeWidget(m map[string]interface{}) fyne.Widget {
items = append(items, decodeFormItem(item.(map[string]interface{})))
}
f.Set(reflect.ValueOf(items))
case "[]widget.ToolbarItem":
var items []widget.ToolbarItem
for _, item := range reflect.ValueOf(v).Interface().([]interface{}) {
items = append(items, decodeToolbarItem(item.(map[string]interface{})))
}
f.Set(reflect.ValueOf(items))
case "fyne.CanvasObject":
fyne.LogError("Unsupported object type: "+class, nil)
case "*url.URL":
Expand Down

0 comments on commit 3716d09

Please sign in to comment.