[gnome-applets] windowpicker/task-item.c: Improve size, position and gradient of the glow pattern



commit 4d3fb75e298d85d6a8cb76d828a2d5bf8ed580e2
Author: Sebastian Geiger <sbastig gmx net>
Date:   Mon Jun 8 21:14:33 2015 +0200

    windowpicker/task-item.c: Improve size, position and gradient of the glow pattern
    
    This patch fixes a problem that causes the glow pattern to not apprear centered,
    when the area.y value is greater than 0 (was only reproducible in GtkInspector).
    
    This slightly reduces the maximum size of the glow pattern to avoid it from overflowing
    the visible area.
    
    This patch increases the gradient distance from the center to make the glow pattern
    more visible.

 windowpicker/src/task-item.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/windowpicker/src/task-item.c b/windowpicker/src/task-item.c
index 50e37ba..a579290 100644
--- a/windowpicker/src/task-item.c
+++ b/windowpicker/src/task-item.c
@@ -288,11 +288,11 @@ static gboolean task_item_draw (
         glow_x = area.width / 2;
         glow_y = area.height / 2;
         glow_pattern = cairo_pattern_create_radial (
-            area.x + glow_x, glow_y, glow_x * 0.6,
-            area.x + glow_x, glow_y, glow_x * 1.5
+            area.x + glow_x, area.y + glow_y, glow_x * 0.3,
+            area.x + glow_x, area.y + glow_y, glow_x * 1.4
         );
         cairo_pattern_add_color_stop_rgba (glow_pattern, 0, 1, 1, 1, 1);
-        cairo_pattern_add_color_stop_rgba (glow_pattern, 0.4, 1, 1, 1, 0);
+        cairo_pattern_add_color_stop_rgba (glow_pattern, 0.6, 1, 1, 1, 0);
         cairo_set_source (cr, glow_pattern);
         cairo_paint (cr);
     }


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