CellRendererIcon: add prelight state and render background - SL #3989
This is to provide feedback on mouse over. The styling needs to be done in the artwork component. Because cell renderers don't inherit GtkWidget anymore, the styling can't be done using the __gtype_name__ . Instead, it has to be done adding a css class [1] to the style context, and rendering the background in the reimplementation of the do_render method. For reference, see how GtkCellRendererToggle implements render [2] and how Baobab app does it [3]. [1] http://developer.gnome.org/gtk3/3.2/GtkStyleContext.html#gtk-style-context-add-class [2] http://git.gnome.org/browse/gtk+/tree/gtk/gtkcellrenderertoggle.c#n338 [3] http://git.gnome.org/browse/baobab/tree/src/baobab-cellrenderers.vala#n125 Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>master
parent
63a34191b1
commit
f5b96e1fbd
Loading…
Reference in New Issue