[gimp] app: make the preedit overlay better readable (text/base instead of fg/bg)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: make the preedit overlay better readable (text/base instead of fg/bg)
- Date: Sat, 20 Feb 2010 14:38:30 +0000 (UTC)
commit 2e0f4e89380f96a3285f6366ef25be2edf8ffef0
Author: Michael Natterer <mitch gimp org>
Date: Sat Feb 20 15:37:54 2010 +0100
app: make the preedit overlay better readable (text/base instead of fg/bg)
app/tools/gimptexttool-editor.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index c29d7e0..b5e0970 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -890,7 +890,9 @@ gimp_text_tool_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, };
gint unused1, unused2;
gint off_x, off_y;
@@ -915,9 +917,17 @@ gimp_text_tool_preedit_start (GtkIMContext *context,
gtk_container_add (GTK_CONTAINER (text_tool->preedit_overlay), frame);
gtk_widget_show (frame);
+ ebox = gtk_event_box_new ();
+ gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL,
+ &style->base[GTK_STATE_NORMAL]);
+ 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_misc_set_padding (GTK_MISC (text_tool->preedit_label), 2, 2);
- gtk_container_add (GTK_CONTAINER (frame), text_tool->preedit_label);
+ 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]