impr: Improve indentation of pattern data tree

#2252
This commit is contained in:
WerWolv
2025-05-16 18:50:35 +02:00
parent 6dab1063a1
commit 1496a6e755

View File

@@ -445,9 +445,11 @@ namespace hex::ui {
ImGui::TableNextColumn();
if (pattern.isSealed() || leaf) {
ImGui::Indent();
highlightWhenSelected(pattern, [&]{ ImGui::TextUnformatted(this->getDisplayName(pattern).c_str()); });
ImGui::Unindent();
ImGui::Indent(ImGui::GetCurrentContext()->FontSize + ImGui::GetStyle().FramePadding.x * 2);
highlightWhenSelected(pattern, [&] {
ImGui::TextUnformatted(this->getDisplayName(pattern).c_str());
});
ImGui::Unindent(ImGui::GetCurrentContext()->FontSize + ImGui::GetStyle().FramePadding.x * 2);
return false;
}