add brackets brush size

This commit is contained in:
2019-11-27 01:08:00 +01:00
parent 64f6b90911
commit 20fbf5586f
6 changed files with 78 additions and 4 deletions

View File

@@ -615,6 +615,18 @@ kEventResult NodeCanvas::handle_event(Event* e)
App::I->dialog_save_ver();
}
}
if (ke->m_key == kKey::KeyBracketLeft)
{
float v = App::I->stroke->m_tip_size->get_value();
float nv = glm::clamp<float>(v - 0.05, 0, 1);
App::I->stroke->set_size(nv, true, true);
}
if (ke->m_key == kKey::KeyBracketRight)
{
float v = App::I->stroke->m_tip_size->get_value();
float nv = glm::clamp<float>(v + 0.05, 0, 1);
App::I->stroke->set_size(nv, true, true);
}
for (auto& mode : *m_canvas->m_mode)
mode->on_KeyEvent(ke);
break;