Centralize retained popup close decorations

This commit is contained in:
2026-06-12 15:10:16 +02:00
parent 4c7c48a22c
commit bbdc746426
6 changed files with 32 additions and 33 deletions

View File

@@ -116,9 +116,7 @@ private:
activate_legacy_popup_overlay(*popup);
popup->on_popup_close = [tick](Node*) {
tick->destroy();
};
pp::panopainter::bind_legacy_popup_close_destroys_overlay(*popup, tick);
auto* panel = &panel_;
popup->on_brush_changed = [panel, button](Node*, std::shared_ptr<Brush>& b) {
@@ -174,9 +172,7 @@ private:
auto c = static_cast<NodeBorder*>(target->m_children[0].get());
panel_.m_picker->set_color(c->m_color);
panel_.m_picker->on_popup_close = [tick](Node*) {
tick->destroy();
};
pp::panopainter::bind_legacy_popup_close_destroys_overlay(*panel_.m_picker, tick);
auto* panel = &panel_;
panel_.m_picker->on_color_change = [panel, c](Node*, glm::vec3 rgb) {