app: use a GimpColorPanel not a GimpColorButton in the text style editor
so we get proper color previews in the popup menu.
This commit is contained in:
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include "text/gimpfontlist.h"
|
#include "text/gimpfontlist.h"
|
||||||
|
|
||||||
|
#include "gimpcolorpanel.h"
|
||||||
#include "gimpcontainerentry.h"
|
#include "gimpcontainerentry.h"
|
||||||
#include "gimpcontainerview.h"
|
#include "gimpcontainerview.h"
|
||||||
#include "gimptextbuffer.h"
|
#include "gimptextbuffer.h"
|
||||||
@ -203,9 +204,9 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
|
|||||||
editor);
|
editor);
|
||||||
|
|
||||||
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
|
||||||
editor->color_button = gimp_color_button_new (_("Change color of selected text"),
|
editor->color_button = gimp_color_panel_new (_("Change color of selected text"),
|
||||||
20, 20, &color,
|
&color,
|
||||||
GIMP_COLOR_AREA_FLAT);
|
GIMP_COLOR_AREA_FLAT, 20, 20);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (editor->upper_hbox), editor->color_button,
|
gtk_box_pack_start (GTK_BOX (editor->upper_hbox), editor->color_button,
|
||||||
FALSE, FALSE, 0);
|
FALSE, FALSE, 0);
|
||||||
@ -293,6 +294,10 @@ gimp_text_style_editor_constructor (GType type,
|
|||||||
G_CALLBACK (gimp_text_style_editor_font_changed),
|
G_CALLBACK (gimp_text_style_editor_font_changed),
|
||||||
editor);
|
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),
|
gimp_container_view_set_container (GIMP_CONTAINER_VIEW (editor->font_entry),
|
||||||
editor->fonts);
|
editor->fonts);
|
||||||
gimp_container_view_set_context (GIMP_CONTAINER_VIEW (editor->font_entry),
|
gimp_container_view_set_context (GIMP_CONTAINER_VIEW (editor->font_entry),
|
||||||
|
Reference in New Issue
Block a user