diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index 8b5a32f..7060416 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -1544,10 +1544,15 @@ void RenderMarketTab(App* app) } }; - // Subtle dot grid while rearranging (fine 32px cells; extends into the buffer rows). + // Subtle dot grid while rearranging (fine 32px cells). Fill the whole visible grid area + // — down to the bottom of the scroll viewport, not just the occupied rows — so a card can + // be dropped anywhere, including the empty space below the current cards. if (interacting) { ImU32 dotc = WithAlpha(OnSurface(), 38); - for (int r = 0; r <= pfMaxRow + 2; r++) + float visibleBottom = dl->GetClipRectMax().y; // bottom edge of the scroll child + int rowsToBottom = (int)((visibleBottom - gy) / pfCellH) + 1; + int lastRow = std::max(pfMaxRow + 2, rowsToBottom); + for (int r = 0; r <= lastRow; r++) for (int c = 0; c <= pfCols; c++) dl->AddCircleFilled(ImVec2(cx + c * pfCellW, gy + r * pfCellH), 1.2f * mktDp, dotc); }