@ -1207,13 +1207,15 @@ void ImGui::SeparatorEx(ImGuiSeparatorFlags flags)
ImGuiContext & g = * GImGui ;
ImGuiContext & g = * GImGui ;
IM_ASSERT ( ImIsPowerOfTwo ( flags & ( ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical ) ) ) ; // Check that only 1 option is selected
IM_ASSERT ( ImIsPowerOfTwo ( flags & ( ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical ) ) ) ; // Check that only 1 option is selected
float thickness_draw = 1.0f ;
float thickness_layout = 0.0f ;
if ( flags & ImGuiSeparatorFlags_Vertical )
if ( flags & ImGuiSeparatorFlags_Vertical )
{
{
// Vertical separator, for menu bars (use current line height). Not exposed because it is misleading and it doesn't have an effect on regular layout.
// Vertical separator, for menu bars (use current line height). Not exposed because it is misleading and it doesn't have an effect on regular layout.
float y1 = window - > DC . CursorPos . y ;
float y1 = window - > DC . CursorPos . y ;
float y2 = window - > DC . CursorPos . y + window - > DC . CurrentLineSize . y ;
float y2 = window - > DC . CursorPos . y + window - > DC . CurrentLineSize . y ;
const ImRect bb ( ImVec2 ( window - > DC . CursorPos . x , y1 ) , ImVec2 ( window - > DC . CursorPos . x + 1.0f , y2 ) ) ;
const ImRect bb ( ImVec2 ( window - > DC . CursorPos . x , y1 ) , ImVec2 ( window - > DC . CursorPos . x + thickness_draw , y2 ) ) ;
ItemSize ( ImVec2 ( 1.0f , 0.0f ) ) ;
ItemSize ( ImVec2 ( thickness_layout , 0.0f ) ) ;
if ( ! ItemAdd ( bb , 0 ) )
if ( ! ItemAdd ( bb , 0 ) )
return ;
return ;
@ -1234,8 +1236,9 @@ void ImGui::SeparatorEx(ImGuiSeparatorFlags flags)
if ( columns )
if ( columns )
PushColumnsBackground ( ) ;
PushColumnsBackground ( ) ;
const ImRect bb ( ImVec2 ( x1 , window - > DC . CursorPos . y ) , ImVec2 ( x2 , window - > DC . CursorPos . y + 1.0f ) ) ;
// We don't provide our width to the layout so that it doesn't get feed back into AutoFit
ItemSize ( ImVec2 ( 0.0f , 1.0f ) ) ; // NB: we don't provide our width so that it doesn't get feed back into AutoFit
const ImRect bb ( ImVec2 ( x1 , window - > DC . CursorPos . y ) , ImVec2 ( x2 , window - > DC . CursorPos . y + thickness_draw ) ) ;
ItemSize ( ImVec2 ( 0.0f , thickness_layout ) ) ;
if ( ! ItemAdd ( bb , 0 ) )
if ( ! ItemAdd ( bb , 0 ) )
{
{
if ( columns )
if ( columns )