fix seam with ui zoom

This commit is contained in:
2019-11-15 23:27:54 +01:00
parent 6581a92f40
commit 4b4c03f45f
2 changed files with 4 additions and 4 deletions

View File

@@ -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();

View File

@@ -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);
}