@@ -4192,8 +4192,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
4192
4192
window->ScrollbarSizes = ImVec2 (window->ScrollbarY ? style.ScrollbarSize : 0 .0f , window->ScrollbarX ? style.ScrollbarSize : 0 .0f );
4193
4193
window->BorderSize = (flags & ImGuiWindowFlags_ShowBorders) ? 1 .0f : 0 .0f ;
4194
4194
4195
- // Window background
4196
- // Default alpha
4195
+ // Window background, Default Alpha
4197
4196
ImGuiCol bg_color_idx = ImGuiCol_WindowBg;
4198
4197
if ((flags & ImGuiWindowFlags_ComboBox) != 0 )
4199
4198
bg_color_idx = ImGuiCol_ComboBg;
@@ -4206,19 +4205,19 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
4206
4205
bg_color.w = bg_alpha;
4207
4206
bg_color.w *= style.Alpha ;
4208
4207
if (bg_color.w > 0 .0f )
4209
- window->DrawList ->AddRectFilled (window->Pos +ImVec2 (0 ,window->TitleBarHeight ()), window->Pos +window->Size , ColorConvertFloat4ToU32 (bg_color), window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 15 : 4 | 8 );
4208
+ window->DrawList ->AddRectFilled (window->Pos +ImVec2 (0 ,window->TitleBarHeight ()), window->Pos +window->Size , ColorConvertFloat4ToU32 (bg_color), window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImGuiCorner_All : ImGuiCorner_BottomLeft|ImGuiCorner_BottomRight );
4210
4209
4211
4210
// Title bar
4212
4211
if (!(flags & ImGuiWindowFlags_NoTitleBar))
4213
- window->DrawList ->AddRectFilled (title_bar_rect.GetTL (), title_bar_rect.GetBR (), GetColorU32 ((g.FocusedWindow && window->RootNonPopupWindow == g.FocusedWindow ->RootNonPopupWindow ) ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg), window_rounding, 1 | 2 );
4212
+ window->DrawList ->AddRectFilled (title_bar_rect.GetTL (), title_bar_rect.GetBR (), GetColorU32 ((g.FocusedWindow && window->RootNonPopupWindow == g.FocusedWindow ->RootNonPopupWindow ) ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg), window_rounding, ImGuiCorner_TopLeft|ImGuiCorner_TopRight );
4214
4213
4215
4214
// Menu bar
4216
4215
if (flags & ImGuiWindowFlags_MenuBar)
4217
4216
{
4218
4217
ImRect menu_bar_rect = window->MenuBarRect ();
4219
- window->DrawList ->AddRectFilled (menu_bar_rect.GetTL (), menu_bar_rect.GetBR (), GetColorU32 (ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0 .0f , 1 |2 );
4220
4218
if (flags & ImGuiWindowFlags_ShowBorders)
4221
4219
window->DrawList ->AddLine (menu_bar_rect.GetBL ()-ImVec2 (0 ,0 ), menu_bar_rect.GetBR ()-ImVec2 (0 ,0 ), GetColorU32 (ImGuiCol_Border));
4220
+ window->DrawList ->AddRectFilled (menu_bar_rect.GetTL (), menu_bar_rect.GetBR (), GetColorU32 (ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0 .0f , ImGuiCorner_TopLeft|ImGuiCorner_TopRight);
4222
4221
}
4223
4222
4224
4223
// Scrollbars
@@ -4426,9 +4425,9 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal)
4426
4425
float window_rounding = (window->Flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding ;
4427
4426
int window_rounding_corners;
4428
4427
if (horizontal)
4429
- window_rounding_corners = 8 | (other_scrollbar ? 0 : 4 );
4428
+ window_rounding_corners = ImGuiCorner_BottomLeft | (other_scrollbar ? 0 : ImGuiCorner_BottomRight );
4430
4429
else
4431
- window_rounding_corners = (((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar)) ? 2 : 0 ) | (other_scrollbar ? 0 : 4 );
4430
+ window_rounding_corners = (((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar)) ? ImGuiCorner_TopRight : 0 ) | (other_scrollbar ? 0 : ImGuiCorner_BottomRight );
4432
4431
window->DrawList ->AddRectFilled (bb.Min , bb.Max , ImGui::GetColorU32 (ImGuiCol_ScrollbarBg), window_rounding, window_rounding_corners);
4433
4432
bb.Reduce (ImVec2 (ImClamp ((float )(int )((bb.Max .x - bb.Min .x - 2 .0f ) * 0 .5f ), 0 .0f , 3 .0f ), ImClamp ((float )(int )((bb.Max .y - bb.Min .y - 2 .0f ) * 0 .5f ), 0 .0f , 3 .0f )));
4434
4433
0 commit comments