From f11e159c44cc3d6895e106c9f3477629ae724820 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Wed, 19 Nov 2025 23:47:40 +0100 Subject: [PATCH] Add mouse over on sourece preview in side panel to show original source image --- src/ImGuiVisitor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ImGuiVisitor.cpp b/src/ImGuiVisitor.cpp index 4d5d6e0..3ecce48 100644 --- a/src/ImGuiVisitor.cpp +++ b/src/ImGuiVisitor.cpp @@ -432,8 +432,14 @@ void ImGuiVisitor::visit (Source& s) } // centered image if (s.ready()) { - ImGui::SetCursorPos( ImVec2(pos.x + 0.5f * (preview_width-width), pos.y + 0.5f * (preview_height-height-space)) ); + ImVec2 dpos = ImVec2(pos.x + 0.5f * (preview_width-width), pos.y + 0.5f * (preview_height-height-space)); + ImGui::SetCursorPos( dpos ); ImGui::Image((void*)(uintptr_t) s.frame()->texture(), ImVec2(width, height)); + if (ImGui::IsItemHovered()) { + ImGui::SetCursorPos( dpos ); + ImGui::Image((void*)(uintptr_t) s.texture(), ImVec2(width, height)); + ImGuiToolkit::ToolTip("Source original image"); + } } else { ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); ImGui::SetCursorPos(