| 115 | t->SetText(RString(text)); |
| 116 | } |
| 117 | |
| 118 | void OptionsShell::PushPage(std::unique_ptr<OptionsPage> page) |
| 119 | { |
| 120 | if (!page) |
| 121 | return; |
| 122 | // Hide the underlying page's controls regardless of modal-ness. |
| 123 | // For non-modal transitions, this is the obvious "the new page |
| 124 | // takes the screen" behaviour. For modals it also matters: modal |
| 125 | // buttons share the notebook surface with the underlying page's |
| 126 | // transparent click overlays (slot Hover / chevron / bar zones), |
| 127 | // and overlapping rows otherwise win the hit-test in declaration |
| 128 | // order — which is why clicking a modal button sometimes only |
| 129 | // hovers/highlights it but doesn't activate (the click resolved |
| 130 | // to the underlying slot's overlay, never reached the modal IDC). |
| 131 | // Hiding makes click dispatch unambiguous and matches the semantic |
| 132 | // that a modal owns input. The visible modal panel is opaque so |
| 133 | // the user still sees a frame and label; the laptop chrome and |
| 134 | // scene around it stay visible because they're not part of the |
| 135 | // page's mounted controls. |
| 136 | if (auto* prev = TopPage()) |
| 137 | ShowPageControls(prev, false); |
| 138 | |
| 139 | OptionsPage* p = page.get(); |
| 140 | m_stack.push_back(std::move(page)); |
| 141 | p->Mount(*this); |
| 142 | ApplyNotebookTheme(p); |
| 143 | int focusIdc = p->DefaultFocusIdc(); |
| 144 | if (focusIdc >= 0) |
| 145 | FocusNotebookCtrl(focusIdc); |
| 146 | p->OnReshown(*this); |
| 147 | RefreshTitle(); |
| 148 | } |
| 149 | |