]> err.no Git - mapper/commitdiff
Use thicker lines
authorKaj-Michael Lang <milang@onion.tal.org>
Fri, 5 Oct 2007 08:54:52 +0000 (11:54 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Fri, 5 Oct 2007 08:54:52 +0000 (11:54 +0300)
src/gtkcompass.c

index 25e08b079d9ea70f55845ba6a2c132f5971c3967..87a8b1166be07cd90a324e61ad0dd0ec7b15834f 100644 (file)
@@ -233,7 +233,7 @@ if (!compass->gc_h) {
        color.blue=0x0000;
        compass->gc_h=gdk_gc_new(widget->window);
        gdk_gc_set_rgb_fg_color(compass->gc_h, &color);
-       gdk_gc_set_line_attributes(compass->gc_h, 6, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND);
+       gdk_gc_set_line_attributes(compass->gc_h, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND);
 }
 
 if (!compass->gc_d) {
@@ -307,36 +307,36 @@ gtk_paint_flat_box (widget->style,
        compass->width, compass->height);
 
 gdk_draw_layout(widget->window,
-       widget->style->fg_gc[GTK_STATE_NORMAL],
+       compass->gc_h,
        compass->xoffset+size/2-x/2,
        compass->yoffset+size-y-2, compass->layout);
 
 gdk_draw_arc(widget->window,
-       widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
+       compass->gc_h,
        FALSE,
        compass->xoffset, compass->yoffset+size/2, size, size, 0, 64 * 180);
 
 /* Simple arrow for heading */
 gdk_draw_line(widget->window,
-       widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
+       compass->gc_h,
        compass->xoffset + size / 2 + 3,
        compass->yoffset + size - y - 5,
        compass->xoffset + size / 2, compass->yoffset + size / 2 + 5);
 
 gdk_draw_line(widget->window,
-       widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
+       compass->gc_h,
        compass->xoffset + size / 2 - 3,
        compass->yoffset + size - y - 5,
        compass->xoffset + size / 2, compass->yoffset + size / 2 + 5);
 
 gdk_draw_line(widget->window,
-       widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
+       compass->gc_h,
        compass->xoffset + size / 2 - 3,
        compass->yoffset + size - y - 5,
        compass->xoffset + size / 2, compass->yoffset + size - y - 8);
 
 gdk_draw_line(widget->window,
-       widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
+       compass->gc_h,
        compass->xoffset + size / 2 + 3,
        compass->yoffset + size - y - 5,
        compass->xoffset + size / 2, compass->yoffset + size - y - 8);
@@ -381,7 +381,7 @@ for (i = 0; i < 5; i++) {
 
        tmp = ((dir - compass->data->heading) * (1.f / 180.f)) * G_PI;
 
-       gtk_compass_draw_mark(compass, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], tmp, 6);
+       gtk_compass_draw_mark(compass, compass->gc_h, tmp, 6);
 
        x = fsize[i];
        if (abs((guint) (compass->data->heading / 45) * 45 - compass->data->heading)
@@ -394,9 +394,9 @@ for (i = 0; i < 5; i++) {
        pango_matrix_rotate (&matrix, -(dir-compass->data->heading));
        pango_context_set_matrix (compass->context, &matrix);
        pango_layout_get_pixel_size(compass->layout, &x, &y);
-       x = compass->xoffset + size / 2 + ((size / 2 + 15) * sinf(tmp)) - x / 2,
-    y = compass->yoffset + size - ((size / 2 + 15) * cosf(tmp)) - y / 2,
-    gdk_draw_layout(widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], x, y, compass->layout);
+       x = compass->xoffset + size / 2 + ((size / 2 + 15 + fs) * sinf(tmp)) - x / 2,
+    y = compass->yoffset + size - ((size / 2 + 15 + fs) * cosf(tmp)) - y / 2,
+    gdk_draw_layout(widget->window, compass->gc_h, x, y, compass->layout);
 }
 
 if (compass->dest_valid)