fix color picker
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "node_dialog_open.h"
|
||||
#include "node_text.h"
|
||||
#include "node_progress_bar.h"
|
||||
#include "node_dialog_picker.h"
|
||||
|
||||
using namespace ui;
|
||||
|
||||
@@ -219,9 +220,11 @@ void App::init_sidebar()
|
||||
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-color"))
|
||||
{
|
||||
button->on_click = [this, button](Node*) {
|
||||
panels->get_child_index(color.get()) == -1 ? panels->add_child(color) : panels->remove_child(color.get());
|
||||
panels->fix_scroll();
|
||||
button->set_color(panels->get_child_index(color.get()) == -1 ? color_button_normal : color_button_hlight);
|
||||
// panels->get_child_index(color.get()) == -1 ? panels->add_child(color) : panels->remove_child(color.get());
|
||||
// panels->fix_scroll();
|
||||
// button->set_color(panels->get_child_index(color.get()) == -1 ? color_button_normal : color_button_hlight);
|
||||
auto pick = layout[main_id]->add_child<NodeColorPicker>();
|
||||
pick->m_color_cur->m_color = ui::Canvas::I->m_current_brush.m_tip_color;
|
||||
};
|
||||
}
|
||||
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-layer"))
|
||||
|
||||
Reference in New Issue
Block a user