[gimp/gtk3-port: 200/226] app: port the text tool editor's preedit popup to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 200/226] app: port the text tool editor's preedit popup to GtkStyleContext
- Date: Thu, 31 Oct 2013 10:14:11 +0000 (UTC)
commit 2ac27b9a702b92d6f0029dd7ac956c97ff6538d0
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 27 15:15:37 2011 +0100
app: port the text tool editor's preedit popup to GtkStyleContext
app/tools/gimptexttool-editor.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 3777ec4..0aa6f13 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -1302,7 +1302,6 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
{
GimpTool *tool = GIMP_TOOL (text_tool);
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
- GtkStyle *style = gtk_widget_get_style (shell->canvas);
GtkWidget *frame;
GtkWidget *ebox;
PangoRectangle cursor_rect = { 0, };
@@ -1333,14 +1332,14 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
gtk_widget_show (frame);
ebox = gtk_event_box_new ();
- gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL,
- &style->base[GTK_STATE_NORMAL]);
+ gtk_style_context_add_class (gtk_widget_get_style_context (ebox),
+ GTK_STYLE_CLASS_ENTRY);
gtk_container_add (GTK_CONTAINER (frame), ebox);
gtk_widget_show (ebox);
text_tool->preedit_label = gtk_label_new (NULL);
- gtk_widget_modify_bg (text_tool->preedit_label, GTK_STATE_NORMAL,
- &style->text[GTK_STATE_NORMAL]);
+ gtk_style_context_add_class (gtk_widget_get_style_context (text_tool->preedit_label),
+ GTK_STYLE_CLASS_ENTRY);
gtk_misc_set_padding (GTK_MISC (text_tool->preedit_label), 2, 2);
gtk_container_add (GTK_CONTAINER (ebox), text_tool->preedit_label);
gtk_widget_show (text_tool->preedit_label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]