[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: New gtk menu system
On Tue, Aug 30, 2011 at 06:51:10PM +0200, Kai-Martin Knaak wrote:
>
> Some glitches:
> I don't see any visual feedback which item the mouse cursor currently refers to.
> Gnome user expectation seems to be, that the item should be highlighted with
> background changing to focus color. Much the same way that the items in a menu
> highlight on mouse-over. Currently, I get focus color only after I clicked a
> layer.
>
Here is some visual feedback. It brightens the swatches when
the mouse is over the row, a little bit. Let me know what you
think of it.
PATCH:
diff --git a/src/hid/gtk/ghid-cell-renderer-visibility.c b/src/hid/gtk/ghid-cell-renderer-visibility.c
index 2e07c67..ee5f6cb 100644
--- a/src/hid/gtk/ghid-cell-renderer-visibility.c
+++ b/src/hid/gtk/ghid-cell-renderer-visibility.c
@@ -125,6 +125,12 @@ ghid_cell_renderer_visibility_render (GtkCellRenderer *cell,
cairo_stroke (cr);
gdk_color_parse (pcb_cell->color, &color);
+ if (flags & GTK_CELL_RENDERER_PRELIT)
+ {
+ color.red = (4*color.red + 65535) / 5;
+ color.green = (4*color.green + 65535) / 5;
+ color.blue = (4*color.blue + 65535) / 5;
+ }
gdk_cairo_set_source_color (cr, &color);
if (pcb_cell->active)
cairo_rectangle (cr, toggle_rect.x + 0.5, toggle_rect.y + 0.5,
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user