From 1496a6e75552509da451f44226665cc50333dfc6 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 16 May 2025 18:50:35 +0200 Subject: [PATCH] impr: Improve indentation of pattern data tree #2252 --- plugins/ui/source/ui/pattern_drawer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/ui/source/ui/pattern_drawer.cpp b/plugins/ui/source/ui/pattern_drawer.cpp index e36695b01..57c24bae7 100644 --- a/plugins/ui/source/ui/pattern_drawer.cpp +++ b/plugins/ui/source/ui/pattern_drawer.cpp @@ -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; }