How to hide NSTrackingSeparatorToolbarItem after collapsing view?

Hi,

I'm trying to implement a split view controller with 3 views: a sidebar, a master view, and a "right" sidebar. The tracking separator for the sidebar works as expected when collapsing the sidebar, meaning it's not visible when the sidebar is collapsed.

However, I'm trying to achieve the same behavior for a second tracking separator (set to track divider index 1) but I'm unable to have the separator not showing when the view is collapsed.

I was assuming the behavior was automatic. If the view is not collapsed, the tracking separator appears in the toolbar, otherwise, it does not. That doesn't seem to be the case.

Is it because there are other items to the right of the separator? Do I have to hide the separator myself or reposition the other toolbar items to the left of the separator when collapsing the view?

Any ideas are appreciated.

Thanks.
I have the same issue, and am looking for a code example that can show how to handle this situation.

The video showing off the new took bar, and the new applications in macOS 11 even go further by converting the toolbar as you resize the window, I also thought this was automatic, but I could not recreate it.

thanks
How to hide NSTrackingSeparatorToolbarItem after collapsing view?
 
 
Q