diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index 4683567..2197913 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -694,8 +694,14 @@ static void pfDrawAddressSection(App* app) float lw = ImGui::GetContentRegionAvail().x; if (filtered.empty()) Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("portfolio_no_addr_match")); - for (const PfPick& pk : filtered) { - const AddressInfo& a = *pk.a; + // C181: clip the portfolio-editor rows. Fixed step = InvisibleButton height (rowH) + ItemSpacing.y, + // so each row's cursor (and the Layout density tokens that read the content region) is exactly where + // the unclipped loop put it; the scroll extent stays exact for the fade shader. + ImGuiListClipper rowClipper; + rowClipper.Begin(static_cast(filtered.size()), rowH + ImGui::GetStyle().ItemSpacing.y); + while (rowClipper.Step()) { + for (int ri = rowClipper.DisplayStart; ri < rowClipper.DisplayEnd; ++ri) { + const AddressInfo& a = *filtered[static_cast(ri)].a; bool inSet = selSet.count(a.address) != 0; ImVec2 rmn = ImGui::GetCursorScreenPos(); ImVec2 rmx(rmn.x + lw, rmn.y + rowH); @@ -750,6 +756,7 @@ static void pfDrawAddressSection(App* app) } ImGui::PopID(); } + } // while (rowClipper.Step()) material::EndFadeScrollChild(s_pfEdit.addrFade, ldl); }