[gnome-applets/wip/segeiger/window-picker-in-process: 6/11] windowpicker/task-item.c: Improve size, position and gradient of the glow pattern
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/window-picker-in-process: 6/11] windowpicker/task-item.c: Improve size, position and gradient of the glow pattern
- Date: Mon, 8 Jun 2015 21:54:24 +0000 (UTC)
commit bdc74aba316b4d1a4ad4f01d08e25d2a1f06ef7a
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 49bedc8..20b85d3 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]