[gnome-applets/wip/segeiger/window-picker-in-process: 6/9] windowpicker/task-item.c: Improve size, position and gradient of the glow pattern



commit 25f466be3a3748f6f9f0774e897bbfe6ccabc9e1
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 6e3d375..f0120fb 100644
--- a/windowpicker/src/task-item.c
+++ b/windowpicker/src/task-item.c
@@ -279,11 +279,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]