fix seam with ui zoom
This commit is contained in:
@@ -928,7 +928,7 @@ void Canvas::stroke_commit()
|
||||
|
||||
void Canvas::stroke_commit_timelapse()
|
||||
{
|
||||
if (m_encoder)
|
||||
if (m_encoder && App::I->rec_running)
|
||||
{
|
||||
auto t_now = std::chrono::high_resolution_clock::now();
|
||||
float dt = std::chrono::duration<float>(t_now - m_disrty_stroke_time).count();
|
||||
|
||||
@@ -1068,10 +1068,10 @@ void Node::clear_context()
|
||||
void Node::update(float width, float height, float zoom)
|
||||
{
|
||||
m_zoom = zoom;
|
||||
YGNodeStyleSetWidth(y_node, ceilf(width / zoom));
|
||||
YGNodeStyleSetHeight(y_node, ceilf(height / zoom));
|
||||
YGNodeStyleSetWidth(y_node, (width / zoom));
|
||||
YGNodeStyleSetHeight(y_node, (height / zoom));
|
||||
YGNodeCalculateLayout(y_node, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
m_proj = glm::ortho(0.f, ceilf(width / zoom), ceilf(height / zoom), 0.f, -1.f, 1.f);
|
||||
m_proj = glm::ortho(0.f, (width / zoom), (height / zoom), 0.f, -1.f, 1.f);
|
||||
update_internal({ 0, 0 }, m_proj, zoom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user