+ TabBar: starts displaying the unsaved document marker with a frame delay to match how close button is processed, otherwise the transition would be noticeable.
tab_pos.x+=host_node->TabBar->WidthAllTabs+g.Style.ItemInnerSpacing.x;// We don't use OffsetNewTab because when using non-persistent-order tab bar it is incremented with each Tab submission.
tab_pos.x+=g.Style.ItemInnerSpacing.x+TabItemCalcSize(host_window->Name,host_window->HasCloseButton).x;// Account for slight offset which will be added when changing from title bar to tab bar
tab_pos.x+=g.Style.ItemInnerSpacing.x+TabItemCalcSize(host_window).x;// Account for slight offset which will be added when changing from title bar to tab bar
}
// Draw tab shape/label preview (payload may be a loose window or a host window carrying multiple tabbed windows)
// Additionally, when using TabBarAddTab() to manipulate tab bar order we occasionally insert new tabs that don't have a width yet,
// and we cannot wait for the next BeginTabItem() call. We cannot compute this width within TabBarAddTab() because font size depends on the active window.
// While rendering tabs, we trim 1 pixel off the top of our bounding box so they can fit within a regular frame height while looking "detached" from it.