remove sidebar and make panels popup

This commit is contained in:
2019-03-05 02:06:07 +01:00
parent 4318fe9728
commit 317292318a
17 changed files with 256 additions and 67 deletions

View File

@@ -361,7 +361,10 @@ glm::vec4 Node::get_children_rect() const
return glm::vec4(0);
glm::vec4 ret = m_children[0]->m_clip_uncut;
for (auto& c : m_children)
ret = rect_union(ret, c->m_clip_uncut);
{
if (c->m_display)
ret = rect_union(ret, c->m_clip_uncut);
}
return ret;
}
@@ -548,6 +551,26 @@ void Node::SetSize(glm::vec2 value)
m_size = value;
}
void Node::SetMaxWidth(float value)
{
YGNodeStyleSetMaxWidth(y_node, value);
}
void Node::SetMaxWidthP(float value)
{
YGNodeStyleSetMaxWidthPercent(y_node, value);
}
void Node::SetMaxHeight(float value)
{
YGNodeStyleSetMaxHeight(y_node, value);
}
void Node::SetMaxHeightP(float value)
{
YGNodeStyleSetMaxHeightPercent(y_node, value);
}
void Node::SetPadding(float t, float r, float b, float l)
{
YGNodeStyleSetPadding(y_node, YGEdgeTop, t);