add quick access panel

This commit is contained in:
2019-03-03 21:43:18 +01:00
parent e7f734c824
commit 91ce555c0a
9 changed files with 113 additions and 8 deletions

View File

@@ -298,10 +298,10 @@ void NodeStrokePreview::draw_stroke_immediate()
}
{
float pad = (5.f + glm::max(glm::min(m_stroke.m_max_size, m_brush->m_tip_size) / 2.f, 10.f)) * App::I.zoom;
float min_pad = size.x * 0.05f;
float pad = (5.f + glm::max(glm::min(m_stroke.m_max_size, m_brush->m_tip_size) / 2.f, min_pad)) * App::I.zoom;
if (b->m_tip_size_pressure)
pad = 10.f * App::I.zoom;
pad = min_pad * App::I.zoom;
float w = m_size.x * App::I.zoom;
float h = m_size.y * App::I.zoom;
std::vector<glm::vec2> kp = {
@@ -530,7 +530,6 @@ void NodeStrokePreview::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
if (m_rtt.getWidth() == new_size.x && m_rtt.getHeight() == new_size.y || !m_brush)
return;
float pad = m_size.x * .15f;
new_size *= root()->m_zoom;
m_rtt.create((int)new_size.x, (int)new_size.y);