widget_color->set_size_request(12,12);
widget_color->signal_activate().connect(
sigc::bind(
- sigc::mem_fun(*this,&studio::Dock_PalEdit::select_color),
+ sigc::mem_fun(*this,&studio::Dock_PalEdit::select_fill_color),
i
)
);
- widget_color->signal_secondary().connect(
+ widget_color->signal_middle_click().connect(
+ sigc::bind(
+ sigc::mem_fun(*this,&studio::Dock_PalEdit::select_outline_color),
+ i
+ )
+ );
+ widget_color->signal_right_click().connect(
sigc::bind(
sigc::mem_fun(*this,&studio::Dock_PalEdit::show_menu),
i
}
void
-Dock_PalEdit::select_color(int i)
+Dock_PalEdit::select_fill_color(int i)
+{
+ synfigapp::Main::set_fill_color(get_color(i));
+}
+
+void
+Dock_PalEdit::select_outline_color(int i)
{
synfigapp::Main::set_outline_color(get_color(i));
}
void set_color(synfig::Color x, int i);
void erase_color(int i);
- void select_color(int i);
+ void select_fill_color(int i);
+ void select_outline_color(int i);
synfig::Color get_color(int i)const;
void edit_color(int i);
public:
synfig::Color color;
sigc::signal<void> signal_activate_;
- sigc::signal<void> signal_secondary_;
+ sigc::signal<void> signal_middle_click_;
+ sigc::signal<void> signal_right_click_;
protected:
public:
sigc::signal<void>& signal_activate() { return signal_activate_; }
sigc::signal<void>& signal_clicked() { return signal_activate_; }
- sigc::signal<void>& signal_secondary() { return signal_secondary_; }
+ sigc::signal<void>& signal_middle_click() { return signal_middle_click_; }
+ sigc::signal<void>& signal_right_click() { return signal_right_click_; }
void set_value(const synfig::Color &data);
const synfig::Color &get_value();