[Xfce4-commits] <xfce4-screenshooter:master> Use a define for background transparency.

Jérôme Guelfucci noreply at xfce.org
Sat Jan 12 11:02:01 CET 2013


Updating branch refs/heads/master
         to 469a8ec930a41ce2958e7c1cf8e4fee0764b59ad (commit)
       from 93848f14ffcb8f42ca27d2ad09ebea3b4bb33a63 (commit)

commit 469a8ec930a41ce2958e7c1cf8e4fee0764b59ad
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sat Dec 8 16:09:50 2012 +0100

    Use a define for background transparency.

 NEWS                        |    6 ++++++
 lib/screenshooter-capture.c |    6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 5a6fd30..4c0af1a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+=== Version x.x.x ===
+
+  * Enhancements:
+    - Make region selection with compositing on more usable on darker
+      backgrounds (bug #9592).
+
 === Version 1.8.1 ===
 
   * Enhancements:
diff --git a/lib/screenshooter-capture.c b/lib/screenshooter-capture.c
index 92e6f1b..f4e6e92 100644
--- a/lib/screenshooter-capture.c
+++ b/lib/screenshooter-capture.c
@@ -19,7 +19,7 @@
 
 #include "screenshooter-capture.h"
 
-
+#define BACKGROUND_TRANSPARENCY 0.4
 
 /* Rubberband data for composited environment */
 typedef struct
@@ -523,7 +523,7 @@ static gboolean cb_expose (GtkWidget *widget,
       for (i = 0; i < n_rects; ++i)
         {
           /* Restore the transparent background */
-          cairo_set_source_rgba (cr, 0, 0, 0, 0.4);
+          cairo_set_source_rgba (cr, 0, 0, 0, BACKGROUND_TRANSPARENCY);
           gdk_cairo_rectangle (cr, &rects[i]);
           cairo_fill (cr);
 
@@ -548,7 +548,7 @@ static gboolean cb_expose (GtkWidget *widget,
 
       /* Draw the transparent background */
       cr = gdk_cairo_create (GDK_DRAWABLE (widget->window));
-      cairo_set_source_rgba (cr, 0, 0, 0, 0.4);
+      cairo_set_source_rgba (cr, 0, 0, 0, BACKGROUND_TRANSPARENCY);
       cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 
       for (i = 0; i < n_rects; ++i)


More information about the Xfce4-commits mailing list