[gimp/gtk3-port: 201/228] 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: 201/228] app: port the text tool editor's preedit popup to GtkStyleContext
- Date: Sat, 3 May 2014 20:15:42 +0000 (UTC)
commit cc9f9cff4f417b7ac02fe9e11e5c2ad66199dc0a
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 b7604c4..769a845 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -1309,7 +1309,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, };
@@ -1340,14 +1339,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]