From 4f0e5b99a8c68f7697c1f36c19cd2d4d4556d067 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 6 Feb 2023 17:24:06 +0100 Subject: [PATCH] pattern: Make visualizer button actually accessible again --- plugins/builtin/source/ui/pattern_drawer.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/builtin/source/ui/pattern_drawer.cpp b/plugins/builtin/source/ui/pattern_drawer.cpp index cf72a8610..8f7f4d96a 100644 --- a/plugins/builtin/source/ui/pattern_drawer.cpp +++ b/plugins/builtin/source/ui/pattern_drawer.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -36,7 +35,6 @@ namespace hex::plugin::builtin::ui { namespace { constexpr auto DisplayEndDefault = 50U; - constexpr auto DisplayEndStep = 50U; using namespace ::std::literals::string_literals; @@ -289,8 +287,6 @@ namespace hex::plugin::builtin::ui { ImGui::TableNextRow(); ImGui::TableNextColumn(); open = createTreeNode(pattern); - ImGui::SameLine(); - drawVisualizerButton(pattern, static_cast(pattern)); ImGui::TableNextColumn(); makeSelectable(pattern); drawCommentTooltip(pattern); @@ -299,6 +295,8 @@ namespace hex::plugin::builtin::ui { drawSizeColumn(pattern); drawTypenameColumn(pattern, "bitfield"); + drawVisualizerButton(pattern, static_cast(pattern)); + ImGui::SameLine(); ImGui::TextFormatted("{}", pattern.getFormattedValue()); } @@ -507,8 +505,6 @@ namespace hex::plugin::builtin::ui { ImGui::TableNextRow(); ImGui::TableNextColumn(); open = createTreeNode(pattern); - ImGui::SameLine(); - drawVisualizerButton(pattern, static_cast(pattern)); ImGui::TableNextColumn(); makeSelectable(pattern); drawCommentTooltip(pattern); @@ -535,6 +531,8 @@ namespace hex::plugin::builtin::ui { ImGui::PopStyleVar(); } } else { + drawVisualizerButton(pattern, static_cast(pattern)); + ImGui::SameLine(); ImGui::TextFormatted("{}", pattern.getFormattedValue()); } @@ -560,8 +558,6 @@ namespace hex::plugin::builtin::ui { ImGui::TableNextRow(); ImGui::TableNextColumn(); open = createTreeNode(pattern); - ImGui::SameLine(); - drawVisualizerButton(pattern, static_cast(pattern)); ImGui::TableNextColumn(); makeSelectable(pattern); drawCommentTooltip(pattern); @@ -588,6 +584,8 @@ namespace hex::plugin::builtin::ui { ImGui::PopStyleVar(); } } else { + drawVisualizerButton(pattern, static_cast(pattern)); + ImGui::SameLine(); ImGui::TextFormatted("{}", pattern.getFormattedValue()); } } @@ -656,8 +654,6 @@ namespace hex::plugin::builtin::ui { ImGui::TableNextRow(); ImGui::TableNextColumn(); open = createTreeNode(pattern); - ImGui::SameLine(); - drawVisualizerButton(pattern, iteratable); ImGui::TableNextColumn(); makeSelectable(pattern); drawCommentTooltip(pattern); @@ -679,6 +675,8 @@ namespace hex::plugin::builtin::ui { ImGui::TableNextColumn(); + drawVisualizerButton(pattern, iteratable); + ImGui::SameLine(); ImGui::TextFormatted("{}", pattern.getFormattedValue()); }