Skip to content

Commit

Permalink
Nav: Removed unnecessary combo code (that kept the combo arrow highli…
Browse files Browse the repository at this point in the history
…ghted after reverting to mouse controls). (#787)
  • Loading branch information
ocornut committed Sep 27, 2017
1 parent a2b2e56 commit 869732c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9538,14 +9538,13 @@ bool ImGui::BeginCombo(const char* label, const char* preview_value, ImVec2 popu

bool hovered, held;
bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held);
const bool navigated = g.NavId == id;

bool popup_open = IsPopupOpen(id);

const ImRect value_bb(frame_bb.Min, frame_bb.Max - ImVec2(arrow_size, 0.0f));
RenderNavHighlight(frame_bb, id);
RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
RenderFrame(ImVec2(frame_bb.Max.x-arrow_size, frame_bb.Min.y), frame_bb.Max, GetColorU32(popup_open || hovered || navigated ? ImGuiCol_ButtonHovered : ImGuiCol_Button), true, style.FrameRounding); // FIXME-ROUNDING
RenderFrame(ImVec2(frame_bb.Max.x-arrow_size, frame_bb.Min.y), frame_bb.Max, GetColorU32(popup_open || hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button), true, style.FrameRounding); // FIXME-ROUNDING
RenderCollapseTriangle(ImVec2(frame_bb.Max.x - arrow_size + style.FramePadding.y, frame_bb.Min.y + style.FramePadding.y), true);

if (preview_value != NULL)
Expand Down

0 comments on commit 869732c

Please sign in to comment.