I am struggling to fix a default behavior related to toolbars and sidebars. I want to have a sidebar with a number of toolbar items associated with it (the sidebar is adjustable and can be pretty big). This is what the top of the window looks like normally:
When the sidebar is shrunk, I would expect that the now hidden toolbar items would collapse into an expansion arrow inside the sidebar. Instead, this arrow appears at the far right of the toolbar, as if the entire window itself had shrunk:
I can access the hidden toolbar items from this arrow, so it is not broken functionally, but the UI is very counterintuitive in this case, and I don't see a way to fix it without re-creating this functionality completely (custom toolbar, custom toolbar items, event detection for resizing the split view, etc.) It is not fixed using a compact, unified, or expanded toolbar style. My question is, is there any built-in way to move this arrow, or associate it with the sidebar somehow? Or if I do have to recreate this, is there some kind of event detection for toolbar items becoming hidden?
Sidebar toolbar item expansion
To be explicit, this is the behavior I am looking for. A shrunken sidebar should result in the newly hidden toolbar items being filed under an expansion arrow that is itself contained within the sidebar: