feat(market): migrate portfolio modal onto the shared blur-overlay framework (Phase 1)
Dogfood the Phase 0 framework: RenderPortfolioEditor now opens via material::BeginOverlayDialog(BlurFloat) + EndOverlayDialog instead of its own inline overlay scaffold, and uses the promoted material:: SegmentedControl / RightAlignX / BeginFadeScrollChild helpers (overlay_scroll.h). Delete the portfolio's inline backdrop/capture-once state machine + its PfEditState capture statics + the four local helper copies. App::render's ModalRenderGuard is now driven by the modal-agnostic AnyBlurOverlayActiveLastFrame() (timing-equivalent), and LatchBlurOverlayActive() at frame end handles the acrylic re-capture on close. Framework tweak: floating cards pop the card WindowPadding after BeginChild (so nested children don't inherit it) and center button labels, keeping the net style-var count at 2 so EndOverlayDialog is unchanged and GlassCard stays byte-identical. RenderPortfolioEditor: 357 -> 282 lines. Needs GUI verification that the portfolio modal is visually/behaviourally unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1269,6 +1269,13 @@ inline bool BeginOverlayDialog(const OverlayDialogSpec& spec)
|
||||
bool childVisible = ImGui::BeginChild(childId.c_str(),
|
||||
ImVec2(cardWidth, fixedHeight ? (cardBottomY - cardY) : 0.0f),
|
||||
cflags, ImGuiWindowFlags_NoScrollbar);
|
||||
// Floating (portfolio-style) cards: the padding applies to this content child only, so pop it
|
||||
// now (nested children mustn't inherit it), and center button labels. Net style-var count stays
|
||||
// at 2 (ChildRounding + ButtonTextAlign) so EndOverlayDialog's PopStyleVar(2) is unchanged.
|
||||
if (floating) {
|
||||
ImGui::PopStyleVar(); // WindowPadding
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.5f, 0.5f));
|
||||
}
|
||||
|
||||
if (childVisible && spec.title) {
|
||||
if (plainHd) {
|
||||
|
||||
Reference in New Issue
Block a user