[gimp] app: paint the text cursor in the highlight color



commit 4f62bdf4365c72489ad33ecd4d1d776fc19fc09b
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 19 10:11:47 2011 +0100

    app: paint the text cursor in the highlight color
    
    so it can be distinguished from the text box rectangle more easily.

 app/tools/gimptexttool.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 1d9f134..3c3a63a 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -793,9 +793,10 @@ gimp_text_tool_draw (GimpDrawTool *draw_tool)
     {
       /* If the text buffer has no selection, draw the text cursor */
 
-      PangoRectangle cursor_rect;
-      gint           off_x, off_y;
-      gboolean       overwrite;
+      GimpCanvasItem *item;
+      PangoRectangle  cursor_rect;
+      gint            off_x, off_y;
+      gboolean        overwrite;
 
       gimp_text_tool_editor_get_cursor_rect (text_tool,
                                              text_tool->overwrite_mode,
@@ -807,7 +808,9 @@ gimp_text_tool_draw (GimpDrawTool *draw_tool)
 
       overwrite = text_tool->overwrite_mode && cursor_rect.width != 0;
 
-      gimp_draw_tool_add_text_cursor (draw_tool, &cursor_rect, overwrite);
+      item = gimp_draw_tool_add_text_cursor (draw_tool, &cursor_rect,
+                                             overwrite);
+      gimp_canvas_item_set_highlight (item, TRUE);
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]