fix document naming and file dialogs preset, add touch scroll, flip thumbnail, scroll gesture and wheel for sidebar

This commit is contained in:
2017-08-12 18:06:36 +01:00
parent 3df8cb4fa5
commit 2711d4e9b0
20 changed files with 160 additions and 29 deletions

View File

@@ -87,7 +87,7 @@ bool App::gesture_start(const glm::vec2& p0, const glm::vec2& p1)
GestureEvent e;
glm::vec2 p = glm::lerp(p0, p1, 0.5f);
e.m_type = kEventType::GestureStart;
e.m_pos = p;
e.m_pos = p / glm::vec2(zoom);
e.m_distance = glm::distance(p0, p1);
gesture_p0 = p0;
gesture_p1 = p1;
@@ -101,7 +101,7 @@ bool App::gesture_move(const glm::vec2& p0, const glm::vec2& p1)
GestureEvent e;
glm::vec2 p = glm::lerp(p0, p1, 0.5f);
e.m_type = kEventType::GestureMove;
e.m_pos = p;
e.m_pos = p / glm::vec2(zoom);
e.m_distance = glm::distance(p0, p1);
e.m_distance_delta = e.m_distance - glm::distance(gesture_p0, gesture_p1);
e.m_pos_delta = p - glm::lerp(gesture_p0, gesture_p1, 0.5f);