summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-18 15:18:56 +0200
committerJasmine Hassan <[email protected]>2012-11-14 09:42:33 +0200
commitd602f60fa4df0d2913e2d6b45f32c4bb1020583a (patch)
tree3db08ccde4ef75c444586c06ecf6f2fce42b834a
parentb8b05eb092ded402d9b0d1b0a80e0627ddbc657a (diff)
downloadcaja-d602f60fa4df0d2913e2d6b45f32c4bb1020583a.tar.bz2
caja-d602f60fa4df0d2913e2d6b45f32c4bb1020583a.tar.xz
[lc-p] properly dash the icon when resizing it
http://git.gnome.org/browse/nautilus/commit/?id=b10d8c00395026719dc0840e9d82e682c7c4e436
-rw-r--r--libcaja-private/caja-icon-canvas-item.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index 64ba3020..e35efec2 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -1599,7 +1599,7 @@ draw_stretch_handles (CajaIconCanvasItem *item, GdkDrawable *drawable,
GtkWidget *widget;
GdkPixbuf *knob_pixbuf;
int knob_width, knob_height;
- double dash[2] = { 1.0, 1.0 };
+ double dash = { 2.0 };
cairo_t *cr;
if (!item->details->show_stretch_handles)
@@ -1615,17 +1615,9 @@ draw_stretch_handles (CajaIconCanvasItem *item, GdkDrawable *drawable,
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
/* first draw the box */
- cairo_set_source_rgb (cr, 1, 1, 1);
- cairo_set_line_width (cr, 1.0);
- cairo_rectangle (cr,
- rect->x0 + 0.5,
- rect->y0 + 0.5,
- rect->x1 - rect->x0 - 1,
- rect->y1 - rect->y0 - 1);
- cairo_stroke (cr);
-
cairo_set_source_rgb (cr, 0, 0, 0);
- cairo_set_dash (cr, dash, G_N_ELEMENTS (dash), 0);
+ cairo_set_dash (cr, &dash, 1, 0);
+ cairo_set_line_width (cr, 1.0);
cairo_rectangle (cr,
rect->x0 + 0.5,
rect->y0 + 0.5,