plug-ins: set the GimpColorConfig on all script-fu color buttons

This commit is contained in:
Michael Natterer 2017-05-28 16:43:00 +02:00
parent 6978094978
commit 6918b4b773
1 changed files with 19 additions and 10 deletions

View File

@ -334,18 +334,27 @@ script_fu_interface (SFScript *script,
break; break;
case SF_COLOR: case SF_COLOR:
left_align = TRUE; {
widget = gimp_color_button_new (_("Script-Fu Color Selection"), GimpColorConfig *config;
COLOR_SAMPLE_WIDTH,
COLOR_SAMPLE_HEIGHT,
&arg->value.sfa_color,
GIMP_COLOR_AREA_FLAT);
gimp_color_button_set_update (GIMP_COLOR_BUTTON (widget), TRUE); left_align = TRUE;
widget = gimp_color_button_new (_("Script-Fu Color Selection"),
COLOR_SAMPLE_WIDTH,
COLOR_SAMPLE_HEIGHT,
&arg->value.sfa_color,
GIMP_COLOR_AREA_FLAT);
g_signal_connect (widget, "color-changed", gimp_color_button_set_update (GIMP_COLOR_BUTTON (widget), TRUE);
G_CALLBACK (gimp_color_button_get_color),
&arg->value.sfa_color); config = gimp_get_color_configuration ();
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (widget),
config);
g_object_unref (config);
g_signal_connect (widget, "color-changed",
G_CALLBACK (gimp_color_button_get_color),
&arg->value.sfa_color);
}
break; break;
case SF_TOGGLE: case SF_TOGGLE: