ImDrawList: small debug-mode optimization when calling AddRect() without rounding + Selectable: small debug-mode optimization.

# Conflicts:
#	imgui_widgets.cpp
This commit is contained in:
ocornut
2023-09-01 15:18:28 +02:00
parent 8c497793f9
commit 3816d478df
3 changed files with 8 additions and 8 deletions

View File

@ -6566,7 +6566,8 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
}
RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding);
if (g.NavId == id)
RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding);
if (span_all_columns && window->DC.CurrentColumns)
PopColumnsBackground();