[gimp] app, cursors: add a cursor for the warp tool



commit 7136f09f0a080f438d7819f83a806515676539f9
Author: Ell <ell_se yahoo com>
Date:   Tue May 30 19:18:24 2017 -0400

    app, cursors: add a cursor for the warp tool
    
    ... and use it instead of the perspective tool cursor.
    
    Disable the cursor modifiers for now, since they're not really
    meaningful.

 app/tools/gimpwarptool.c      |    6 ++++--
 app/widgets/gimpcursor.c      |    1 +
 app/widgets/widgets-enums.h   |    1 +
 cursors/Makefile.am           |    1 +
 cursors/gimp-tool-cursors.xcf |  Bin 76745 -> 77065 bytes
 cursors/tool-warp.png         |  Bin 0 -> 565 bytes
 6 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index d2d6179..476b230 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -195,7 +195,7 @@ gimp_warp_tool_init (GimpWarpTool *self)
                                          GIMP_DIRTY_ACTIVE_DRAWABLE);
   gimp_tool_control_set_wants_click     (tool->control, TRUE);
   gimp_tool_control_set_tool_cursor     (tool->control,
-                                         GIMP_TOOL_CURSOR_PERSPECTIVE);
+                                         GIMP_TOOL_CURSOR_WARP);
   gimp_tool_control_set_action_size     (tool->control,
                                          "tools/tools-warp-effect-size-set");
   gimp_tool_control_set_action_hardness (tool->control,
@@ -435,7 +435,7 @@ gimp_warp_tool_cursor_update (GimpTool         *tool,
 {
   GimpWarpTool       *wt       = GIMP_WARP_TOOL (tool);
   GimpWarpOptions    *options  = GIMP_WARP_TOOL_GET_OPTIONS (tool);
-  GimpCursorModifier  modifier = GIMP_CURSOR_MODIFIER_PLUS;
+  GimpCursorModifier  modifier = GIMP_CURSOR_MODIFIER_NONE;
 
   if (! gimp_warp_tool_can_stroke (wt, display, FALSE))
     {
@@ -443,6 +443,7 @@ gimp_warp_tool_cursor_update (GimpTool         *tool,
     }
   else if (display == tool->display)
     {
+#if 0
       /* FIXME have better cursors  */
 
       switch (options->behavior)
@@ -457,6 +458,7 @@ gimp_warp_tool_cursor_update (GimpTool         *tool,
           modifier = GIMP_CURSOR_MODIFIER_MOVE;
           break;
         }
+#endif
     }
 
   gimp_tool_control_set_cursor_modifier (tool->control, modifier);
diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c
index e46db1d..30d887b 100644
--- a/app/widgets/gimpcursor.c
+++ b/app/widgets/gimpcursor.c
@@ -192,6 +192,7 @@ static GimpCursor gimp_tool_cursors[] =
   { "tool-dodge.png" },
   { "tool-burn.png" },
   { "tool-measure.png" },
+  { "tool-warp.png" },
   { "tool-hand.png" }
 };
 
diff --git a/app/widgets/widgets-enums.h b/app/widgets/widgets-enums.h
index 270a79c..3443a6d 100644
--- a/app/widgets/widgets-enums.h
+++ b/app/widgets/widgets-enums.h
@@ -262,6 +262,7 @@ typedef enum  /*< skip >*/
   GIMP_TOOL_CURSOR_DODGE,
   GIMP_TOOL_CURSOR_BURN,
   GIMP_TOOL_CURSOR_MEASURE,
+  GIMP_TOOL_CURSOR_WARP,
   GIMP_TOOL_CURSOR_HAND,
   GIMP_TOOL_CURSOR_LAST
 } GimpToolCursorType;
diff --git a/cursors/Makefile.am b/cursors/Makefile.am
index aef058e..a4f82bb 100644
--- a/cursors/Makefile.am
+++ b/cursors/Makefile.am
@@ -75,6 +75,7 @@ CURSOR_IMAGES = \
        tool-shear.png                          \
        tool-smudge.png                         \
        tool-text.png                           \
+       tool-warp.png                           \
        tool-zoom.png
 
 COLOR_PICKER_IMAGES = \
diff --git a/cursors/gimp-tool-cursors.xcf b/cursors/gimp-tool-cursors.xcf
index a4bc70e..b76288b 100644
Binary files a/cursors/gimp-tool-cursors.xcf and b/cursors/gimp-tool-cursors.xcf differ
diff --git a/cursors/tool-warp.png b/cursors/tool-warp.png
new file mode 100644
index 0000000..ddc0fff
Binary files /dev/null and b/cursors/tool-warp.png differ


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