X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Fsrc%2Fgtkmm%2Fwidget_value.cpp;fp=synfig-studio%2Fsrc%2Fgtkmm%2Fwidget_value.cpp;h=64506d8e3a8b014cb93702c97542a2b4fec7ad2b;hb=fe91f263221605c2230850ece62a0c4b700da8c0;hp=c6a8b973f4f1453d28cd46bf49a2b087ac124f38;hpb=5db52fae78534162bf522dd4a66e43e9f97d4db4;p=synfig.git diff --git a/synfig-studio/src/gtkmm/widget_value.cpp b/synfig-studio/src/gtkmm/widget_value.cpp index c6a8b97..64506d8 100644 --- a/synfig-studio/src/gtkmm/widget_value.cpp +++ b/synfig-studio/src/gtkmm/widget_value.cpp @@ -43,7 +43,6 @@ #include "widget_vector.h" #include "widget_filename.h" #include "widget_enum.h" -#include "widget_coloredit.h" #include "widget_canvaschooser.h" #include "widget_time.h" #include "app.h" @@ -84,7 +83,7 @@ Widget_ValueBase::Widget_ValueBase(): vector_widget=manage(new class Widget_Vector()); pack_start(*vector_widget); - color_widget=manage(new class Widget_ColorEdit()); + color_widget=manage(new class Gtk::ColorSelection()); pack_start(*color_widget); enum_widget=manage(new class Widget_Enum()); @@ -122,7 +121,7 @@ Widget_ValueBase::Widget_ValueBase(): vector_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); - color_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); + //color_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); enum_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); real_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); integer_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate)); @@ -169,7 +168,7 @@ Widget_ValueBase::inside_cellrenderer() vector_widget->set_has_frame(false); //vector_widget->set_digits(10); - color_widget->set_has_frame(false); + //color_widget->set_has_frame(false); //color_widget->set_digits(10); filename_widget->set_has_frame(false); time_widget->set_has_frame(false); @@ -280,7 +279,8 @@ Widget_ValueBase::set_value(const synfig::ValueBase &data) break; case ValueBase::TYPE_COLOR: { - color_widget->set_value(value.get(synfig::Color())); + color_widget->set_current_color(studio::colorconv_synfig2gdk(value.get(synfig::Color()))); + color_widget->set_current_alpha((guint16) value.get(synfig::Color()).get_a() * 65535); color_widget->show(); /* Gdk::Color gdkcolor; @@ -349,7 +349,7 @@ Widget_ValueBase::get_value() break; case ValueBase::TYPE_COLOR: { - value=color_widget->get_value(); + value=studio::colorconv_gdk2synfig(color_widget->get_current_color(), color_widget->get_current_alpha() / 65535.0); /* Gdk::Color gdkcolor; synfig::Color color;