It would make sense to only display it when the menubar is hidden. Moreso considering this button cannot be added or removed via Configure the Toolbar. It does go away if it's clicked on twice (first time to disable the menubar, second time to enable it.)
It's also possible to not have menubar and the change visibility button is hidden.
Edited
Designs
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
Thanks for testing, than let's push it ! I think the number of items in the array has to match with the number of toolbar items. Iirc, having no entry for it in the arrays would require some nasty hack.
Hmm, not sure if that is a good idea. I suppose people will wonder why the toolbar icon does not show when checking the checkbox. Possibly the icon could be shown as insensitive ... feel free to take a try for that !