Revert titles in legend dialog to previous format

This commit is contained in:
enricoturri1966 2020-07-30 14:15:00 +02:00
parent 534e8bb909
commit 2dee3abea0

View file

@ -762,16 +762,10 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co
void ImGuiWrapper::title(const std::string& str)
{
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImRect frame_bb;
frame_bb.Min = { window->WorkRect.Min.x, window->DC.CursorPos.y };
frame_bb.Max = { window->WorkRect.Max.x, window->DC.CursorPos.y + ImGui::CalcTextSize(str.c_str(), nullptr, false).y };
frame_bb.Min.x -= IM_FLOOR(window->WindowPadding.x * 0.5f - 1.0f);
frame_bb.Max.x += IM_FLOOR(window->WindowPadding.x * 0.5f);
window->DrawList->AddRectFilled(frame_bb.Min, frame_bb.Max, ImGui::GetColorU32(COL_ORANGE_DARK), 0.0f, 0);
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiWrapper::COL_ORANGE_LIGHT);
text(str);
ImGui::PopStyleColor();
ImGui::Separator();
}
void ImGuiWrapper::disabled_begin(bool disabled)