[gimp] Issue #7034: Add single dot cursor mode



commit 187d2e3390b99dbb205a4d72b8040f996d2dabf1
Author: L amander <lamander111 gmail com>
Date:   Sun Aug 8 16:01:38 2021 +0200

    Issue #7034: Add single dot cursor mode

 app/config/config-enums.c             |   2 ++
 app/config/config-enums.h             |   3 ++-
 app/display/gimpdisplayshell-cursor.c |   5 +++++
 app/widgets/gimpcursor.c              |   4 ++++
 app/widgets/widgets-enums.h           |   1 +
 cursors/Makefile.am                   |   2 ++
 cursors/cursor-single-dot-x2.png      | Bin 0 -> 220 bytes
 cursors/cursor-single-dot.png         | Bin 0 -> 213 bytes
 8 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/app/config/config-enums.c b/app/config/config-enums.c
index 4c414b9b01..2a8a86f472 100644
--- a/app/config/config-enums.c
+++ b/app/config/config-enums.c
@@ -78,6 +78,7 @@ gimp_cursor_mode_get_type (void)
     { GIMP_CURSOR_MODE_TOOL_ICON, "GIMP_CURSOR_MODE_TOOL_ICON", "tool-icon" },
     { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, "GIMP_CURSOR_MODE_TOOL_CROSSHAIR", "tool-crosshair" },
     { GIMP_CURSOR_MODE_CROSSHAIR, "GIMP_CURSOR_MODE_CROSSHAIR", "crosshair" },
+    { GIMP_CURSOR_MODE_SINGLE_DOT, "GIMP_CURSOR_MODE_SINGLE_DOT", "single-dot" },
     { 0, NULL, NULL }
   };
 
@@ -86,6 +87,7 @@ gimp_cursor_mode_get_type (void)
     { GIMP_CURSOR_MODE_TOOL_ICON, NC_("cursor-mode", "Tool icon"), NULL },
     { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, NC_("cursor-mode", "Tool icon with crosshair"), NULL },
     { GIMP_CURSOR_MODE_CROSSHAIR, NC_("cursor-mode", "Crosshair only"), NULL },
+    { GIMP_CURSOR_MODE_SINGLE_DOT, NC_("cursor-mode", "Single Dot"), NULL },
     { 0, NULL, NULL }
   };
 
diff --git a/app/config/config-enums.h b/app/config/config-enums.h
index 24c465ff18..46ef5cf8d9 100644
--- a/app/config/config-enums.h
+++ b/app/config/config-enums.h
@@ -52,7 +52,8 @@ typedef enum
 {
   GIMP_CURSOR_MODE_TOOL_ICON,       /*< desc="Tool icon"                >*/
   GIMP_CURSOR_MODE_TOOL_CROSSHAIR,  /*< desc="Tool icon with crosshair" >*/
-  GIMP_CURSOR_MODE_CROSSHAIR        /*< desc="Crosshair only"           >*/
+  GIMP_CURSOR_MODE_CROSSHAIR,       /*< desc="Crosshair only"           >*/
+  GIMP_CURSOR_MODE_SINGLE_DOT       /*< desc="Single Dot"               >*/
 } GimpCursorMode;
 
 
diff --git a/app/display/gimpdisplayshell-cursor.c b/app/display/gimpdisplayshell-cursor.c
index 5a536d509a..f9038a59a3 100644
--- a/app/display/gimpdisplayshell-cursor.c
+++ b/app/display/gimpdisplayshell-cursor.c
@@ -270,6 +270,11 @@ gimp_display_shell_real_set_cursor (GimpDisplayShell   *shell,
               modifier = GIMP_CURSOR_MODIFIER_NONE;
             }
           break;
+
+        case GIMP_CURSOR_MODE_SINGLE_DOT:
+          cursor_type = GIMP_CURSOR_SINGLE_DOT;
+          tool_cursor = GIMP_TOOL_CURSOR_NONE;
+          break;
         }
     }
 
diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c
index 2fcbe8310c..511db68084 100644
--- a/app/widgets/gimpcursor.c
+++ b/app/widgets/gimpcursor.c
@@ -155,6 +155,10 @@ static GimpCursor gimp_cursors[] =
   {
     "cursor-side-top-left",
     cursor_default_hot_x, cursor_default_hot_y
+  },
+  { 
+    "cursor-single-dot",
+    cursor_default_hot_x, cursor_default_hot_y
   }
 };
 
diff --git a/app/widgets/widgets-enums.h b/app/widgets/widgets-enums.h
index 00e387026d..3ba1c6e5c8 100644
--- a/app/widgets/widgets-enums.h
+++ b/app/widgets/widgets-enums.h
@@ -207,6 +207,7 @@ typedef enum  /*< skip >*/
   GIMP_CURSOR_SIDE_BOTTOM_LEFT,
   GIMP_CURSOR_SIDE_LEFT,
   GIMP_CURSOR_SIDE_TOP_LEFT,
+  GIMP_CURSOR_SINGLE_DOT,
   GIMP_CURSOR_LAST
 } GimpCursorType;
 
diff --git a/cursors/Makefile.am b/cursors/Makefile.am
index 599ca3d53d..f37a64499d 100644
--- a/cursors/Makefile.am
+++ b/cursors/Makefile.am
@@ -47,6 +47,8 @@ CURSOR_IMAGES = \
        cursor-side-top-right-x2.png            \
        cursor-side-top.png                     \
        cursor-side-top-x2.png                  \
+       cursor-single-dot.png           \
+       cursor-single-dot-x2.png                \
        cursor-zoom.png                         \
        cursor-zoom-x2.png                      \
        \
diff --git a/cursors/cursor-single-dot-x2.png b/cursors/cursor-single-dot-x2.png
new file mode 100644
index 0000000000..7fbda4cd1b
Binary files /dev/null and b/cursors/cursor-single-dot-x2.png differ
diff --git a/cursors/cursor-single-dot.png b/cursors/cursor-single-dot.png
new file mode 100644
index 0000000000..e08efd8110
Binary files /dev/null and b/cursors/cursor-single-dot.png differ


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