| 7156 | } |
| 7157 | |
| 7158 | static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window) |
| 7159 | { |
| 7160 | ImGuiContext& g = *GImGui; |
| 7161 | const float border_size = window->WindowBorderSize; |
| 7162 | const ImU32 border_col = GetColorU32(ImGuiCol_Border); |
| 7163 | if (border_size > 0.0f && (window->Flags & ImGuiWindowFlags_NoBackground) == 0) |
| 7164 | window->DrawList->AddRect(window->Pos, window->Pos + window->Size, border_col, window->WindowRounding, window->WindowBorderSize); |
| 7165 | else if (border_size > 0.0f) |
| 7166 | { |
| 7167 | if (window->ChildFlags & ImGuiChildFlags_ResizeX) // Similar code as 'resize_border_mask' computation in UpdateWindowManualResize() but we specifically only always draw explicit child resize border. |
| 7168 | RenderWindowOuterSingleBorder(window, 1, border_col, border_size); |
| 7169 | if (window->ChildFlags & ImGuiChildFlags_ResizeY) |
| 7170 | RenderWindowOuterSingleBorder(window, 3, border_col, border_size); |
| 7171 | } |
| 7172 | if (window->ResizeBorderHovered != -1 || window->ResizeBorderHeld != -1) |
| 7173 | { |
| 7174 | const int border_n = (window->ResizeBorderHeld != -1) ? window->ResizeBorderHeld : window->ResizeBorderHovered; |
| 7175 | const ImU32 border_col_resizing = GetColorU32((window->ResizeBorderHeld != -1) ? ImGuiCol_SeparatorActive : ImGuiCol_SeparatorHovered); |
| 7176 | RenderWindowOuterSingleBorder(window, border_n, border_col_resizing, ImMax(2.0f, window->WindowBorderSize)); // Thicker than usual |
| 7177 | } |
| 7178 | if (g.Style.FrameBorderSize > 0 && !(window->Flags & ImGuiWindowFlags_NoTitleBar)) |
| 7179 | { |
| 7180 | float y = window->Pos.y + window->TitleBarHeight - 1; |
| 7181 | window->DrawList->AddLineH(window->Pos.x + border_size * 0.5f, window->Pos.x + window->Size.x - border_size * 0.5f, y, border_col, g.Style.FrameBorderSize); |
| 7182 | } |
| 7183 | } |
| 7184 | |
| 7185 | // Draw background and borders |
| 7186 | // Draw and handle scrollbars |
nothing calls this directly
no test coverage detected