c89 fix and add 1px border between selection indicator and contents
2007-07-28 Thomas Wood <thos@gnome.org> * wp-cellrenderer.c: (cell_renderer_wallpaper_render): c89 fix and add 1px border between selection indicator and contents svn path=/trunk/; revision=7911
This commit is contained in:
parent
c4b82d2716
commit
1c73b3c809
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-07-28 Thomas Wood <thos@gnome.org>
|
||||||
|
|
||||||
|
* wp-cellrenderer.c: (cell_renderer_wallpaper_render): c89 fix and add 1px
|
||||||
|
border between selection indicator and contents
|
||||||
|
|
||||||
2007-07-28 Thomas Wood <thos@gnome.org>
|
2007-07-28 Thomas Wood <thos@gnome.org>
|
||||||
|
|
||||||
* wp-cellrenderer.c: (cell_renderer_wallpaper_render): Use cairo to draw the
|
* wp-cellrenderer.c: (cell_renderer_wallpaper_render): Use cairo to draw the
|
||||||
|
|
|
@ -69,11 +69,11 @@ cell_renderer_wallpaper_render (GtkCellRenderer *cell,
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
int radius = 5;
|
int radius = 5;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
|
GtkStateType state;
|
||||||
x = background_area->x;
|
x = background_area->x;
|
||||||
y = background_area->y;
|
y = background_area->y;
|
||||||
w = background_area->width;
|
w = background_area->width;
|
||||||
h = background_area->height;
|
h = background_area->height;
|
||||||
GtkStateType state;
|
|
||||||
|
|
||||||
if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
|
if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
|
||||||
{
|
{
|
||||||
|
@ -95,8 +95,8 @@ cell_renderer_wallpaper_render (GtkCellRenderer *cell,
|
||||||
cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.5, M_PI);
|
cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.5, M_PI);
|
||||||
cairo_close_path (cr);
|
cairo_close_path (cr);
|
||||||
|
|
||||||
/* FIXME: this should not be hardcoded to 5 */
|
/* FIXME: this should not be hardcoded to 4 */
|
||||||
cairo_rectangle (cr, x + 5, y + 5, w - 10, h - 10);
|
cairo_rectangle (cr, x + 4, y + 4, w - 8, h - 8);
|
||||||
|
|
||||||
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
|
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue