mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
impr: Further refine pattern tree indenting
This commit is contained in:
@@ -445,11 +445,12 @@ namespace hex::ui {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (pattern.isSealed() || leaf) {
|
||||
ImGui::Indent(ImGui::GetCurrentContext()->FontSize + ImGui::GetStyle().FramePadding.x * 2);
|
||||
const float indent = ImGui::GetCurrentContext()->FontSize + ImGui::GetStyle().FramePadding.x * 2;
|
||||
ImGui::Indent(indent);
|
||||
highlightWhenSelected(pattern, [&] {
|
||||
ImGui::TextUnformatted(this->getDisplayName(pattern).c_str());
|
||||
});
|
||||
ImGui::Unindent(ImGui::GetCurrentContext()->FontSize + ImGui::GetStyle().FramePadding.x * 2);
|
||||
ImGui::Unindent(indent);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1320,6 +1321,7 @@ namespace hex::ui {
|
||||
if (beginPatternTable(patterns, m_sortedPatterns, height)) {
|
||||
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImGui::GetColorU32(ImGuiCol_HeaderHovered, 0.4F));
|
||||
ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImGui::GetColorU32(ImGuiCol_HeaderActive, 0.4F));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, ImGui::CalcTextSize(" ").x * 2);
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
m_showFavoriteStars = false;
|
||||
@@ -1390,6 +1392,7 @@ namespace hex::ui {
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
ImGui::EndTable();
|
||||
|
||||
Reference in New Issue
Block a user