[gimp] app: use a GimpColorPanel not a GimpColorButton in the text style editor
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use a GimpColorPanel not a GimpColorButton in the text style editor
- Date: Wed, 29 Sep 2010 19:15:41 +0000 (UTC)
commit 81cfb4404730e3f0eb38ee2cb4628fa321644303
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 29 21:14:51 2010 +0200
app: use a GimpColorPanel not a GimpColorButton in the text style editor
so we get proper color previews in the popup menu.
app/widgets/gimptextstyleeditor.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c
index d00ec1e..e6fb863 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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]