Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed cell background overlapping with header #7575

Closed
wants to merge 1 commit into from

Conversation

prabuinet
Copy link
Contributor

This commit fixes the following issue:

#7041

@prabuinet
Copy link
Contributor Author

code to recreate the issue:

  if (ImGui::BeginTable("Test", 1, ImGuiTableFlags_Resizable | ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders | ImGuiTableFlags_ScrollY))
  {
      static bool selected[100] = {};

      ImGui::TableSetupScrollFreeze(0, 1);
      ImGui::TableSetupColumn("Test Column", ImGuiTableColumnFlags_None);
      ImGui::TableHeadersRow();
      for (int i = 0; i < 100; i++)
      {
          char label[32];
          sprintf(label, "Item %d", i);
          ImGui::TableNextRow();
          ImGui::TableNextColumn();
          ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ImGui::GetColorU32(ImVec4(0.9f, 0.3, 0.3f, 0.6f)), 0);
          ImGui::Text(label);
      }
      ImGui::EndTable();
  }

image

@ocornut
Copy link
Owner

ocornut commented May 13, 2024

Thank you @prabuinet, this is correct and indeed fixes the issue. Merged now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants