Centralize retained popup activation

This commit is contained in:
2026-06-12 14:52:27 +02:00
parent 2e98efa13a
commit 76c0ed3c10
8 changed files with 39 additions and 40 deletions

View File

@@ -486,9 +486,7 @@ void App::init_sidebar()
stroke->SetPosition(pos.x - stroke->m_size.x / 2.f, pos.y + 16);
stroke->SetPositioning(YGPositionTypeAbsolute);
stroke->m_capture_children = false;
stroke->m_mouse_ignore = false;
stroke->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*stroke);
auto scroll = stroke->find<NodeScroll>("scroller");
//scroll->SetHeight(glm::max(100.f, screen.y - pos.y - 200.f));
@@ -531,9 +529,7 @@ void App::init_sidebar()
color->SetPosition(pos.x - color->m_size.x / 2.f, pos.y + 16);
color->SetPositioning(YGPositionTypeAbsolute);
color->m_capture_children = false;
color->m_mouse_ignore = false;
color->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*color);
color->on_popup_close = [this, tick](Node*) {
tick->destroy();
@@ -566,9 +562,7 @@ void App::init_sidebar()
layers->SetPosition(pos.x - layers->m_size.x / 2.f, pos.y + 16);
layers->SetPositioning(YGPositionTypeAbsolute);
layers->m_capture_children = false;
layers->m_mouse_ignore = false;
layers->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*layers);
auto scroll = layers->find<NodeScroll>("layers-container");
scroll->SetMaxHeight(glm::max(100.f, screen.y - pos.y - 200.f));
@@ -603,9 +597,7 @@ void App::init_sidebar()
grid->SetPosition(pos.x - grid->m_size.x / 2.f, pos.y + 16);
grid->SetPositioning(YGPositionTypeAbsolute);
grid->m_capture_children = false;
grid->m_mouse_ignore = false;
grid->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*grid);
auto scroll = grid->find<NodeScroll>("scroller");
scroll->SetMaxHeight(glm::max(100.f, screen.y - pos.y - 250.f));