brush panel folding
This commit is contained in:
@@ -82,6 +82,15 @@ void NodePanelStroke::update_controls()
|
||||
m_preview->draw_stroke();
|
||||
}
|
||||
|
||||
void NodePanelStroke::init_fold(const std::string& name)
|
||||
{
|
||||
if (auto b = find<NodeButton>(("button-unfold-" + name).c_str())) {
|
||||
b->on_click = [this,name](Node*) {
|
||||
find(("fold-" + name).c_str())->ToggleVisibility();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void NodePanelStroke::init_controls()
|
||||
{
|
||||
m_brush_popup = std::make_shared<NodePanelBrush>();
|
||||
@@ -382,21 +391,13 @@ void NodePanelStroke::init_controls()
|
||||
m_preview->m_brush = Canvas::I->m_current_brush;
|
||||
m_preview->draw_stroke();
|
||||
|
||||
/*
|
||||
auto load_stencil = find<NodeButton>("tip-stencil-load");
|
||||
load_stencil->on_click = [this](Node*) {
|
||||
App::I.pick_image([this](std::string path) {
|
||||
App::I.async_start();
|
||||
if (TextureManager::load(path.c_str()))
|
||||
{
|
||||
if (on_pattern_changed)
|
||||
on_pattern_changed(this, path, "");
|
||||
}
|
||||
App::I.async_redraw();
|
||||
App::I.async_end();
|
||||
});
|
||||
};
|
||||
*/
|
||||
init_fold("color");
|
||||
init_fold("metrics");
|
||||
init_fold("pattern");
|
||||
init_fold("dualbrush");
|
||||
init_fold("medium");
|
||||
init_fold("colorvar");
|
||||
init_fold("jitter");
|
||||
|
||||
update_controls();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user