You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using Append and Prepend you can add buttons to a Toolbar and it refreshes, if you change an existing ToolbarItem and try to refresh, it does not. This is because toolbar.resetObjects first checks to see if the number of toolbar items has changed before doing any refreshing. Obviously if changing the image for an icon (for example toggling bookmark on/ off for a list) the number of items in the toolbar does not change.
To Reproduce:
Create a toolbar via widget.NewToolbar with any number of ToolbarItems with icons
Display the toolbar in a window/canvas/layout.
Programmatically change any of the ToolbarItems
Refresh the window/canvas/layout/toolbar
The icon does not change
Alter the code in toolbar.go to remove the changed-items-count test and the button changes.
While using Append and Prepend you can add buttons to a Toolbar and it refreshes, if you change an existing ToolbarItem and try to refresh, it does not. This is because toolbar.resetObjects first checks to see if the number of toolbar items has changed before doing any refreshing. Obviously if changing the image for an icon (for example toggling bookmark on/ off for a list) the number of items in the toolbar does not change.
To Reproduce:
widget.NewToolbar
with any number of ToolbarItems with iconsAlter the code in
toolbar.go
to remove the changed-items-count test and the button changes.Example code:
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: