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

@@ -270,9 +270,7 @@ void NodePanelStroke::init_controls()
m_brush_popup->loaded();
m_brush_popup->SetPositioning(YGPositionTypeAbsolute);
m_brush_popup->SetSize(300, 400);
m_brush_popup->m_mouse_ignore = false;
m_brush_popup->m_flood_events = true;
m_brush_popup->m_capture_children = false;
pp::panopainter::configure_legacy_popup_overlay(*m_brush_popup);
m_pattern_popup = std::make_shared<NodePanelBrush>();
m_pattern_popup->set_manager(m_manager);
@@ -282,9 +280,7 @@ void NodePanelStroke::init_controls()
m_pattern_popup->loaded();
m_pattern_popup->SetPositioning(YGPositionTypeAbsolute);
m_pattern_popup->SetSize(300, 400);
m_pattern_popup->m_mouse_ignore = false;
m_pattern_popup->m_flood_events = true;
m_pattern_popup->m_capture_children = false;
pp::panopainter::configure_legacy_popup_overlay(*m_pattern_popup);
//m_presets_popup = std::make_shared<NodePanelBrushPreset>();
//m_presets_popup->m_manager = m_manager;
@@ -334,10 +330,7 @@ void NodePanelStroke::init_controls()
pos.y = 0;
App::I->presets->SetPosition(pos.x + 16, pos.y);
App::I->presets->SetPositioning(YGPositionTypeAbsolute);
App::I->presets->m_mouse_ignore = false;
App::I->presets->m_flood_events = true;
App::I->presets->m_capture_children = false;
App::I->presets->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*App::I->presets);
root()->update();
App::I->presets->on_popup_close = [this, tick](Node*) {
@@ -382,7 +375,7 @@ void NodePanelStroke::init_controls()
if (pos.y < 0)
pos.y = 0;
m_brush_popup->SetPosition(pos.x + 16, pos.y);
m_brush_popup->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*m_brush_popup);
root()->update();
m_brush_popup->on_popup_close = [this, tick](Node*) {
@@ -419,7 +412,7 @@ void NodePanelStroke::init_controls()
if (pos.y < 0)
pos.y = 0;
m_brush_popup->SetPosition(pos.x + 16, pos.y);
m_brush_popup->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*m_brush_popup);
root()->update();
m_brush_popup->on_popup_close = [this, tick](Node*) {
@@ -456,7 +449,7 @@ void NodePanelStroke::init_controls()
if (pos.y < 0)
pos.y = 0;
m_pattern_popup->SetPosition(pos.x + 16, pos.y);
m_pattern_popup->mouse_capture();
pp::panopainter::activate_legacy_popup_overlay(*m_pattern_popup);
root()->update();
m_pattern_popup->on_popup_close = [this, tick](Node*) {