[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (0f9a4b4d102619bf871f9fb79e3221cf2f220808)
The branch, master has been updated
via 0f9a4b4d102619bf871f9fb79e3221cf2f220808 (commit)
from 2b66cd7a7eec8b1d9394eb7e5feda0be3c7d47d3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/ghid-cell-renderer-visibility.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 0f9a4b4d102619bf871f9fb79e3221cf2f220808
Author: Peter Clifton <peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
Commit: Peter Clifton <peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
hid/gtk: Add subtle gradient effect to layer selector swatches
Just because gradients are pretty ;)
:100644 100644 6e69744... 063d434... M src/hid/gtk/ghid-cell-renderer-visibility.c
=========
Changes
=========
commit 0f9a4b4d102619bf871f9fb79e3221cf2f220808
Author: Peter Clifton <peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
Commit: Peter Clifton <peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
hid/gtk: Add subtle gradient effect to layer selector swatches
Just because gradients are pretty ;)
diff --git a/src/hid/gtk/ghid-cell-renderer-visibility.c b/src/hid/gtk/ghid-cell-renderer-visibility.c
index 6e69744..063d434 100644
--- a/src/hid/gtk/ghid-cell-renderer-visibility.c
+++ b/src/hid/gtk/ghid-cell-renderer-visibility.c
@@ -116,6 +116,8 @@ ghid_cell_renderer_visibility_render (GtkCellRenderer *cell,
{
GdkColor color;
cairo_t *cr = gdk_cairo_create (window);
+ cairo_pattern_t *pattern;
+
if (expose_area)
{
gdk_cairo_rectangle (cr, expose_area);
@@ -137,7 +139,25 @@ ghid_cell_renderer_visibility_render (GtkCellRenderer *cell,
color.green = (4*color.green + 65535) / 5;
color.blue = (4*color.blue + 65535) / 5;
}
- gdk_cairo_set_source_color (cr, &color);
+
+ pattern = cairo_pattern_create_radial ((toggle_rect.width - 1.) * 0.75 + toggle_rect.x + 0.5,
+ (toggle_rect.height - 1.) * 0.75 + toggle_rect.y + 0.5,
+ 0.,
+ (toggle_rect.width - 1.) * 0.50 + toggle_rect.x + 0.5,
+ (toggle_rect.height - 1.) * 0.50 + toggle_rect.y + 0.5,
+ (toggle_rect.width - 1.) * 0.71);
+
+ cairo_pattern_add_color_stop_rgb (pattern, 0.0,
+ (color.red / 65535. * 4. + 1.) / 5.,
+ (color.green / 65535. * 4. + 1.) / 5.,
+ (color.blue / 65535. * 4. + 1.) / 5.);
+ cairo_pattern_add_color_stop_rgb (pattern, 1.0,
+ (color.red / 65535. * 5. + 0.) / 5.,
+ (color.green / 65535. * 5. + 0.) / 5.,
+ (color.blue / 65535. * 5. + 0.) / 5.);
+ cairo_set_source (cr, pattern);
+ cairo_pattern_destroy (pattern);
+
if (pcb_cell->active)
cairo_rectangle (cr, toggle_rect.x + 0.5, toggle_rect.y + 0.5,
toggle_rect.width - 1, toggle_rect.height - 1);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs