[gimp] app: add a canvas style for "split view" guides
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add a canvas style for "split view" guides
- Date: Mon, 4 Apr 2016 20:12:58 +0000 (UTC)
commit 8984df028f224e7f0e8bc6cc590d19fd08200cd1
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 4 22:12:33 2016 +0200
app: add a canvas style for "split view" guides
app/core/core-enums.c | 2 ++
app/core/core-enums.h | 3 ++-
app/display/gimpcanvas-style.c | 16 ++++++++++++++++
3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index e72ca5b..82474eb 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -219,6 +219,7 @@ gimp_guide_style_get_type (void)
{ GIMP_GUIDE_STYLE_NORMAL, "GIMP_GUIDE_STYLE_NORMAL", "normal" },
{ GIMP_GUIDE_STYLE_MIRROR, "GIMP_GUIDE_STYLE_MIRROR", "mirror" },
{ GIMP_GUIDE_STYLE_MANDALA, "GIMP_GUIDE_STYLE_MANDALA", "mandala" },
+ { GIMP_GUIDE_STYLE_SPLIT_VIEW, "GIMP_GUIDE_STYLE_SPLIT_VIEW", "split-view" },
{ 0, NULL, NULL }
};
@@ -228,6 +229,7 @@ gimp_guide_style_get_type (void)
{ GIMP_GUIDE_STYLE_NORMAL, "GIMP_GUIDE_STYLE_NORMAL", NULL },
{ GIMP_GUIDE_STYLE_MIRROR, "GIMP_GUIDE_STYLE_MIRROR", NULL },
{ GIMP_GUIDE_STYLE_MANDALA, "GIMP_GUIDE_STYLE_MANDALA", NULL },
+ { GIMP_GUIDE_STYLE_SPLIT_VIEW, "GIMP_GUIDE_STYLE_SPLIT_VIEW", NULL },
{ 0, NULL, NULL }
};
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index ce88c22..dc4f073 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -127,7 +127,8 @@ typedef enum /*< pdb-skip >*/
GIMP_GUIDE_STYLE_NONE,
GIMP_GUIDE_STYLE_NORMAL,
GIMP_GUIDE_STYLE_MIRROR,
- GIMP_GUIDE_STYLE_MANDALA
+ GIMP_GUIDE_STYLE_MANDALA,
+ GIMP_GUIDE_STYLE_SPLIT_VIEW
} GimpGuideStyle;
diff --git a/app/display/gimpcanvas-style.c b/app/display/gimpcanvas-style.c
index e80bb5a..ff6f044 100644
--- a/app/display/gimpcanvas-style.c
+++ b/app/display/gimpcanvas-style.c
@@ -50,6 +50,11 @@ static const GimpRGB guide_mandala_normal_bg = { 0.0, 1.0, 1.0, 1.0 };
static const GimpRGB guide_mandala_active_fg = { 0.0, 1.0, 1.0, 1.0 };
static const GimpRGB guide_mandala_active_bg = { 1.0, 0.0, 0.0, 1.0 };
+static const GimpRGB guide_split_normal_fg = { 1.0, 1.0, 1.0, 1.0 };
+static const GimpRGB guide_split_normal_bg = { 1.0, 0.0, 1.0, 1.0 };
+static const GimpRGB guide_split_active_fg = { 1.0, 0.0, 1.0, 1.0 };
+static const GimpRGB guide_split_active_bg = { 1.0, 0.0, 0.0, 1.0 };
+
/* Styles for other canvas items. */
static const GimpRGB sample_point_normal = { 0.0, 0.5, 1.0, 1.0 };
static const GimpRGB sample_point_active = { 1.0, 0.0, 0.0, 1.0 };
@@ -114,6 +119,7 @@ gimp_canvas_set_guide_style (GtkWidget *canvas,
active_bg = guide_active_bg;
line_width = 1.0;
break;
+
case GIMP_GUIDE_STYLE_MIRROR:
normal_fg = guide_mirror_normal_fg;
normal_bg = guide_mirror_normal_bg;
@@ -121,6 +127,7 @@ gimp_canvas_set_guide_style (GtkWidget *canvas,
active_bg = guide_mirror_active_bg;
line_width = 1.0;
break;
+
case GIMP_GUIDE_STYLE_MANDALA:
normal_fg = guide_mandala_normal_fg;
normal_bg = guide_mandala_normal_bg;
@@ -128,6 +135,15 @@ gimp_canvas_set_guide_style (GtkWidget *canvas,
active_bg = guide_mandala_active_bg;
line_width = 1.0;
break;
+
+ case GIMP_GUIDE_STYLE_SPLIT_VIEW:
+ normal_fg = guide_split_normal_fg;
+ normal_bg = guide_split_normal_bg;
+ active_fg = guide_split_active_fg;
+ active_bg = guide_split_active_bg;
+ line_width = 1.0;
+ break;
+
default: /* GIMP_GUIDE_STYLE_NONE */
/* This should not happen. */
g_return_if_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]