diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c index d00ec1e365..e6fb86320b 100644 --- a/app/widgets/gimptextstyleeditor.c +++ b/app/widgets/gimptextstyleeditor.c @@ -34,6 +34,7 @@ #include "text/gimpfontlist.h" +#include "gimpcolorpanel.h" #include "gimpcontainerentry.h" #include "gimpcontainerview.h" #include "gimptextbuffer.h" @@ -203,9 +204,9 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor) editor); gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0); - editor->color_button = gimp_color_button_new (_("Change color of selected text"), - 20, 20, &color, - GIMP_COLOR_AREA_FLAT); + editor->color_button = gimp_color_panel_new (_("Change color of selected text"), + &color, + GIMP_COLOR_AREA_FLAT, 20, 20); gtk_box_pack_start (GTK_BOX (editor->upper_hbox), editor->color_button, FALSE, FALSE, 0); @@ -293,6 +294,10 @@ gimp_text_style_editor_constructor (GType type, G_CALLBACK (gimp_text_style_editor_font_changed), editor); + /* use the global user context so we get the global FG/BG colors */ + gimp_color_panel_set_context (GIMP_COLOR_PANEL (editor->color_button), + gimp_get_user_context (editor->gimp)); + gimp_container_view_set_container (GIMP_CONTAINER_VIEW (editor->font_entry), editor->fonts); gimp_container_view_set_context (GIMP_CONTAINER_VIEW (editor->font_entry),