Grayed hint text after open font list

This commit is contained in:
Filip Sykala - NTB T15p 2023-01-17 15:25:00 +01:00
parent a0ad13fe71
commit 6da3c5799c

View File

@ -1969,6 +1969,8 @@ void GLGizmoEmboss::draw_font_list()
ImGuiInputTextFlags input_flags = ImGuiInputTextFlags_CharsUppercase;
// change color of hint to normal text
bool is_popup_open = ImGui::IsPopupOpen(popup_id);
if (!is_popup_open)
ImGui::PushStyleColor(ImGuiCol_TextDisabled, ImGui::GetStyleColorVec4(ImGuiCol_Text));
if (ImGui::InputTextWithHint(input_id, selected, &m_face_names.search, input_flags)) {
// update filtration result
@ -1980,6 +1982,7 @@ void GLGizmoEmboss::draw_font_list()
m_face_names.hide[index] = !name._Starts_with(m_face_names.search);
}
}
if (!is_popup_open)
ImGui::PopStyleColor(); // revert changes for hint color
const bool is_input_text_active = ImGui::IsItemActive();