fix docking panels size

This commit is contained in:
2019-04-06 00:34:49 +02:00
parent 9aaaaef705
commit 1bb9b5dec5
3 changed files with 41 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ kEventResult NodePanelFloating::handle_event(Event* e)
m_dragging = true;
if (me->m_pos.y - m_pos.y > m_size.y - 20.f)
{
if (me->m_pos.x - m_pos.x > m_size.x - 20.f)
if (m_dock.expired() && me->m_pos.x - m_pos.x > m_size.x - 20.f)
{
m_action = kDragAction::Resize;
}
@@ -83,7 +83,7 @@ kEventResult NodePanelFloating::handle_event(Event* e)
m_outline->m_color = { 0, 0, 0, 0.1 };
m_outline->m_thinkness = 1;
m_drop_placeholder = std::make_shared<NodeBorder>();
m_drop_placeholder->SetSize(300, 10);
m_drop_placeholder->SetSize(350, 10);
m_drop_placeholder->m_color = { 0, 0, 0, 0.1 };
m_drop_placeholder->m_thinkness = 1;
}
@@ -178,7 +178,7 @@ kEventResult NodePanelFloating::handle_event(Event* e)
SetPosition(0, 0);
if (m_dock.lock() != c)
{
SetWidth(300);
SetWidth(350);
c->add_child(ref, drop_pos);
m_dock = c;
}