[gimp] app: GimpFreeSelectTool: highlight the hovered handle



commit 6f4be58716eabf4274aa16aa9e1adca568908711
Author: Michael Natterer <mitch gimp org>
Date:   Sat Apr 2 08:29:53 2011 +0200

    app: GimpFreeSelectTool: highlight the hovered handle

 app/tools/gimpfreeselecttool.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c
index 27200f8..0461cd1 100644
--- a/app/tools/gimpfreeselecttool.c
+++ b/app/tools/gimpfreeselecttool.c
@@ -1566,12 +1566,19 @@ gimp_free_select_tool_draw (GimpDrawTool *draw_tool)
             handle_type = GIMP_HANDLE_CIRCLE;
 
           if (handle_type != -1)
-            gimp_draw_tool_add_handle (draw_tool, handle_type,
-                                       point->x,
-                                       point->y,
-                                       GIMP_TOOL_HANDLE_SIZE_CIRCLE,
-                                       GIMP_TOOL_HANDLE_SIZE_CIRCLE,
-                                       GIMP_HANDLE_ANCHOR_CENTER);
+            {
+              GimpCanvasItem *item;
+
+              item = gimp_draw_tool_add_handle (draw_tool, handle_type,
+                                                point->x,
+                                                point->y,
+                                                GIMP_TOOL_HANDLE_SIZE_CIRCLE,
+                                                GIMP_TOOL_HANDLE_SIZE_CIRCLE,
+                                                GIMP_HANDLE_ANCHOR_CENTER);
+
+              if (dist < POINT_GRAB_THRESHOLD_SQ)
+                gimp_canvas_item_set_highlight (item, TRUE);
+            }
         }
     }
 



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