Centralize retained keyboard dialog closing

This commit is contained in:
2026-06-12 15:39:52 +02:00
parent 0c41101f5f
commit 935e6972a5
5 changed files with 15 additions and 6 deletions

View File

@@ -525,6 +525,9 @@ agent or engineer to remove them without reconstructing context from chat.
browse/resize, layer-rename, cloud-browse, and PPBR export dialog cancel
buttons now bind retained destroy-on-click behavior through
`src/legacy_ui_overlay_services.*`.
- 2026-06-12: DEBT-0063/DEBT-0058 were narrowed again. App-level new-document,
save, and layer-rename cancel callbacks now route retained dialog destruction
plus virtual-keyboard hide through `src/legacy_ui_overlay_services.*`.
- 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now
passes the configure-time CMake executable into `package-smoke.ps1`, so VS
2026 generator validation does not depend on an older `cmake` on PATH, and

View File

@@ -502,6 +502,8 @@ Message-box submit/cancel and input-box cancel destroy callbacks now use the
same retained close binding helpers.
Document open/save/new/browse/resize, layer-rename, cloud-browse, and PPBR
export dialog cancel buttons now use those same retained close helpers.
App-level new-document, save, and layer-rename cancel callbacks now share the
retained dialog close plus virtual-keyboard hide helper.
Raw popup callback captures and full close/capture ownership remain part of
`DEBT-0063`.
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,

View File

@@ -211,8 +211,7 @@ void App::dialog_newdoc()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
};
@@ -343,8 +342,7 @@ void App::dialog_save()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
(void)pp::panopainter::attach_legacy_overlay_node(*this, dialog);
@@ -464,8 +462,7 @@ void App::dialog_layer_rename()
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I->hideKeyboard();
pp::panopainter::close_legacy_dialog_and_hide_keyboard(*this, *dialog);
};
}

View File

@@ -34,6 +34,12 @@ void close_legacy_popup_overlay(Node& node) noexcept
node.destroy();
}
void close_legacy_dialog_and_hide_keyboard(App& app, Node& node)
{
node.destroy();
app.hideKeyboard();
}
void close_legacy_popup_panel(
Node& node,
const std::function<void(Node*)>& on_close)

View File

@@ -16,6 +16,7 @@ void initialize_legacy_overlay_node(App& app, Node& node);
void configure_legacy_popup_overlay(Node& node) noexcept;
void activate_legacy_popup_overlay(Node& node) noexcept;
void close_legacy_popup_overlay(Node& node) noexcept;
void close_legacy_dialog_and_hide_keyboard(App& app, Node& node);
void close_legacy_popup_panel(
Node& node,
const std::function<void(Node*)>& on_close);