diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index 6b34914..05bb63d 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -182,8 +182,14 @@ static void RenderPortfolioEditor(App* app) Type().textColored(TypeStyle::Caption, OnSurfaceMedium(), selc); ImGui::Dummy(ImVec2(0, Layout::spacingXs())); - // Address checklist. - ImGui::BeginChild("##pfAddrList", ImVec2(0, -ImGui::GetFrameHeightWithSpacing() * 1.5f), true); + // Address checklist. The overlay dialog auto-resizes to its content + // (ImGuiChildFlags_AutoResizeY), so a negative "fill-remaining" height collapses to ~0 + // here — size the list to its rows instead, capped at 40% of the viewport so a large + // wallet scrolls rather than running off-screen. + float pfRowH = ImGui::GetFrameHeightWithSpacing(); + int pfRows = std::max(1, (int)state.addresses.size()); + float pfListH = std::min(pfRows * pfRowH, ImGui::GetMainViewport()->Size.y * 0.4f); + ImGui::BeginChild("##pfAddrList", ImVec2(0, pfListH), true); for (const auto& a : state.addresses) { bool inSet = data::PortfolioEntryContains(s_pf_addrs, a.address); char line[192];