mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Selectable, Style: selected Selectable() use _Header color instead of an arbitrary lerp between _Header and _HeaderHovered. (#8106, #1861)
This commit is contained in:
parent
ccb6646bae
commit
81cfe09657
3 changed files with 5 additions and 7 deletions
|
|
@ -7017,12 +7017,8 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
|||
const bool highlighted = hovered || (flags & ImGuiSelectableFlags_Highlight);
|
||||
if (highlighted || selected)
|
||||
{
|
||||
// FIXME-MULTISELECT: Styling: Color for 'selected' elements? ImGuiCol_HeaderSelected
|
||||
ImU32 col;
|
||||
if (selected && !highlighted)
|
||||
col = GetColorU32(ImLerp(GetStyleColorVec4(ImGuiCol_Header), GetStyleColorVec4(ImGuiCol_HeaderHovered), 0.5f));
|
||||
else
|
||||
col = GetColorU32((held && highlighted) ? ImGuiCol_HeaderActive : highlighted ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
||||
// Between 1.91.0 and 1.91.4 we made selected Selectable use an arbitrary lerp between _Header and _HeaderHovered. Removed that now. (#8106)
|
||||
ImU32 col = GetColorU32((held && highlighted) ? ImGuiCol_HeaderActive : highlighted ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
||||
RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
|
||||
}
|
||||
if (g.NavId == id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue