@@ -271,6 +271,13 @@ HitTestResult UIRenderer::HitTest(float x, float y) {
271271 }
272272 }
273273
274+ // Draggable Panel Body
275+ if (x >= m_lastInfoPanelRect.left && x <= m_lastInfoPanelRect.right &&
276+ y >= m_lastInfoPanelRect.top && y <= m_lastInfoPanelRect.bottom ) {
277+ result.type = UIHitResult::InfoPanelDrag;
278+ return result;
279+ }
280+
274281 // Not on any clickable element, reset hover
275282 m_hoverRowIndex = -1 ;
276283
@@ -2615,7 +2622,9 @@ void UIRenderer::DrawCompactInfo(ID2D1DeviceContext* dc) {
26152622 float textW = MeasureTextWidth (info);
26162623 // [[maybe_unused]] float totalW = textW + 56.0f * s;
26172624
2618- D2D1_RECT_F rect = D2D1::RectF (16 .0f * s, 8 .0f * s, 16 .0f * s + textW, 32 .0f * s);
2625+ float startX = g_runtime.InfoPanelX * s;
2626+ float startY = g_runtime.InfoPanelY * s;
2627+ D2D1_RECT_F rect = D2D1::RectF (startX, startY, startX + textW, startY + 24 .0f * s);
26192628 // [Visual Consistency] Follow UI theme instead of image luma
26202629 const AdaptiveUiPalette palette = BuildAdaptivePalette (IsLightThemeActive () ? 1 .0f : 0 .0f , &m_compactInfoAdaptiveBlend);
26212630
@@ -2635,6 +2644,9 @@ void UIRenderer::DrawCompactInfo(ID2D1DeviceContext* dc) {
26352644 // Close Button [x]
26362645 m_panelCloseRect = D2D1::RectF (m_panelToggleRect.right + 4 .0f * s, rect.top , m_panelToggleRect.right + 28 .0f * s, rect.bottom );
26372646 DrawTextWithFourWayShadow (dc, L" [x]" , 3 , m_panelFormat.Get (), m_panelCloseRect, brushRed.Get (), brushShadow.Get (), 1 .1f * s);
2647+
2648+ // Save bounds for hit testing (include buttons)
2649+ m_lastInfoPanelRect = D2D1::RectF (rect.left , rect.top , m_panelCloseRect.right , m_panelCloseRect.bottom );
26382650}
26392651
26402652float UIRenderer::EstimateCanvasLuminance () const {
@@ -2835,13 +2847,14 @@ void UIRenderer::DrawInfoPanel(ID2D1DeviceContext* dc) {
28352847 }
28362848 width = (std::clamp)(width, 220 .0f * s, 300 .0f * s);
28372849 float height = 26 .0f * s + (float )m_infoGrid.size () * GRID_ROW_HEIGHT * s + 14 .0f * s;
2838- float startX = 16 . 0f * s;
2839- float startY = 32 . 0f * s;
2850+ float startX = g_runtime. InfoPanelX * s;
2851+ float startY = g_runtime. InfoPanelY * s;
28402852
28412853 if (g_currentMetadata.HasGPS ) height += 50 .0f * s;
28422854 if (g_runtime.InfoPanelExpanded && !g_currentMetadata.HistL .empty ()) height += 100 .0f * s;
28432855
28442856 D2D1_RECT_F panelRect = D2D1::RectF (startX, startY, startX + width, startY + height);
2857+ m_lastInfoPanelRect = panelRect;
28452858
28462859 // [Geek Glass] Panel Background Render
28472860 QuickView::UI::GeekGlass::GeekGlassConfig glassConfig;
0 commit comments