improve layout
This commit is contained in:
@@ -59,7 +59,7 @@ void NodeScroll::on_tick(float dt)
|
||||
auto rect = get_children_rect();
|
||||
// fix scrollbar
|
||||
float sz = m_size.y - (pad[0] + pad[2]);
|
||||
float new_pad = rect.w == 0 || rect.w <= sz ? 5 : 35;
|
||||
float new_pad = rect.w == 0 || rect.w <= sz + 2 ? 5 : 35;
|
||||
if (pad[1] != new_pad)
|
||||
{
|
||||
YGNodeStyleSetPadding(y_node, YGEdgeRight, new_pad);
|
||||
|
||||
Reference in New Issue
Block a user