Add mouse over on sourece preview in side panel to show original source image

This commit is contained in:
brunoherbelin
2025-11-19 23:47:40 +01:00
parent f9c14db284
commit f11e159c44

View File

@@ -432,8 +432,14 @@ void ImGuiVisitor::visit (Source& s)
} }
// centered image // centered image
if (s.ready()) { 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)); 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 { } else {
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE);
ImGui::SetCursorPos( ImGui::SetCursorPos(