@ -5777,7 +5777,7 @@ static inline ImVec2 CalcWindowMinSize(ImGuiWindow* window)
// Reduce artifacts with very small windows
ImGuiWindow * window_for_height = window ;
size_min . y = ImMax ( size_min . y , window_for_height - > TitleBarHeight ( ) + window_for_height - > MenuBarHeight ( ) + ImMax ( 0.0f , g . Style . WindowRounding - 1.0f ) ) ;
size_min . y = ImMax ( size_min . y , window_for_height - > TitleBarHeight + window_for_height - > MenuBarHeight + ImMax ( 0.0f , g . Style . WindowRounding - 1.0f ) ) ;
return size_min ;
}
@ -5988,7 +5988,7 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
ImRect clamp_rect = visibility_rect ;
const bool window_move_from_title_bar = g . IO . ConfigWindowsMoveFromTitleBarOnly & & ! ( window - > Flags & ImGuiWindowFlags_NoTitleBar ) ;
if ( window_move_from_title_bar )
clamp_rect . Min . y - = window - > TitleBarHeight ( ) ;
clamp_rect . Min . y - = window - > TitleBarHeight ;
ImVec2 pos_target ( FLT_MAX , FLT_MAX ) ;
ImVec2 size_target ( FLT_MAX , FLT_MAX ) ;
@ -6187,7 +6187,7 @@ static inline void ClampWindowPos(ImGuiWindow* window, const ImRect& visibility_
ImGuiContext & g = * GImGui ;
ImVec2 size_for_clamping = window - > Size ;
if ( g . IO . ConfigWindowsMoveFromTitleBarOnly & & ! ( window - > Flags & ImGuiWindowFlags_NoTitleBar ) )
size_for_clamping . y = window - > TitleBarHeight ( ) ;
size_for_clamping . y = window - > TitleBarHeight ;
window - > Pos = ImClamp ( window - > Pos , visibility_rect . Min - size_for_clamping , visibility_rect . Max ) ;
}
@ -6223,7 +6223,7 @@ static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
}
if ( g . Style . FrameBorderSize > 0 & & ! ( window - > Flags & ImGuiWindowFlags_NoTitleBar ) )
{
float y = window - > Pos . y + window - > TitleBarHeight ( ) - 1 ;
float y = window - > Pos . y + window - > TitleBarHeight - 1 ;
window - > DrawList - > AddLine ( ImVec2 ( window - > Pos . x + border_size , y ) , ImVec2 ( window - > Pos . x + window - > Size . x - border_size , y ) , border_col , g . Style . FrameBorderSize ) ;
}
}
@ -6268,7 +6268,7 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
}
if ( override_alpha )
bg_col = ( bg_col & ~ IM_COL32_A_MASK ) | ( IM_F32_TO_INT8_SAT ( alpha ) < < IM_COL32_A_SHIFT ) ;
window - > DrawList - > AddRectFilled ( window - > Pos + ImVec2 ( 0 , window - > TitleBarHeight ( ) ) , window - > Pos + window - > Size , bg_col , window_rounding , ( flags & ImGuiWindowFlags_NoTitleBar ) ? 0 : ImDrawFlags_RoundCornersBottom ) ;
window - > DrawList - > AddRectFilled ( window - > Pos + ImVec2 ( 0 , window - > TitleBarHeight ) , window - > Pos + window - > Size , bg_col , window_rounding , ( flags & ImGuiWindowFlags_NoTitleBar ) ? 0 : ImDrawFlags_RoundCornersBottom ) ;
}
// Title bar
@ -6730,6 +6730,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Lock menu offset so size calculation can use it as menu-bar windows need a minimum size.
window - > DC . MenuBarOffset . x = ImMax ( ImMax ( window - > WindowPadding . x , style . ItemSpacing . x ) , g . NextWindowData . MenuBarOffsetMinVal . x ) ;
window - > DC . MenuBarOffset . y = g . NextWindowData . MenuBarOffsetMinVal . y ;
window - > TitleBarHeight = ( flags & ImGuiWindowFlags_NoTitleBar ) ? 0.0f : g . FontSize + g . Style . FramePadding . y * 2.0f ;
window - > MenuBarHeight = ( flags & ImGuiWindowFlags_MenuBar ) ? window - > DC . MenuBarOffset . y + g . FontSize + g . Style . FramePadding . y * 2.0f : 0.0f ;
// Depending on condition we use previous or current window size to compare against contents size to decide if a scrollbar should be visible.
// Those flags will be altered further down in the function depending on more conditions.
@ -6770,7 +6772,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
const ImVec2 scrollbar_sizes_from_last_frame = window - > ScrollbarSizes ;
window - > DecoOuterSizeX1 = 0.0f ;
window - > DecoOuterSizeX2 = 0.0f ;
window - > DecoOuterSizeY1 = window - > TitleBarHeight ( ) + window - > MenuBarHeight ( ) ;
window - > DecoOuterSizeY1 = window - > TitleBarHeight + window - > MenuBarHeight ;
window - > DecoOuterSizeY2 = 0.0f ;
window - > ScrollbarSizes = ImVec2 ( 0.0f , 0.0f ) ;