integrate quick panel and new color picker

This commit is contained in:
2019-03-04 18:38:38 +01:00
parent fb006a6859
commit 6e73a9eee5
13 changed files with 234 additions and 81 deletions

View File

@@ -218,6 +218,18 @@ void NodePanelStroke::update_controls()
m_pattern_thumb->set_image(b->m_pattern_thumb_path);
}
void NodePanelStroke::set_flow(float value, bool normalized, bool propagate)
{
float v = normalized ? value : m_curves[m_tip_flow].to_slider(value);
m_tip_flow->set_value(v, propagate);
}
void NodePanelStroke::set_size(float value, bool normalized, bool propagate)
{
float v = normalized ? value : m_curves[m_tip_size].to_value(value);
m_tip_size->set_value(v, propagate);
}
void NodePanelStroke::init_fold(const std::string& name)
{
if (auto b = find<NodeButton>(("button-unfold-" + name).c_str())) {
@@ -316,6 +328,8 @@ void NodePanelStroke::init_controls()
m_dual_brush_thumb->set_image(b->m_dual_thumb_path);
m_pattern_thumb->set_image(b->m_pattern_thumb_path);
update_controls();
if (on_stroke_change)
on_stroke_change(this);
};
};