]> err.no Git - mapper/commitdiff
Don't bother with the satellite number if the view is very small
authorKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 14:59:11 +0000 (17:59 +0300)
committerKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 14:59:11 +0000 (17:59 +0300)
src/gtkgps.c

index 5302227a3cca0e77e4dc6facac74c9647e57b2d4..bb7ce0473bff3cc518e77316f509a61e6f412d0f 100644 (file)
@@ -395,12 +395,14 @@ for (i=0;i<gps->data->satinview;i++) {
        x = xoffset + halfsize + (90 - gps->data->sat[i].elevation) * halfsize / 90 * sinf(tmp);
        y = yoffset + halfsize - (90 - gps->data->sat[i].elevation) * halfsize / 90 * cosf(tmp);
 
-       gdk_draw_arc(widget->window, gc, TRUE, x-gps->fs, y-gps->fs, gps->fs+8, gps->fs+8, 0, 64 * 360);
+       gdk_draw_arc(widget->window, gc, TRUE, x-gps->fs, y-gps->fs, gps->fs+6, gps->fs+6, 0, 64 * 360);
 
-       g_snprintf(buffer, 6, "%02d", gps->data->sat[i].prn);
-       pango_layout_set_text(gps->layout, buffer, -1);
-       pango_layout_get_pixel_size(gps->layout, &x1, &y1);
-       gdk_draw_layout(widget->window, gps->gc_w, x-gps->fs/2-x1/2+2, y-gps->fs/2-y1/2+2, gps->layout);
+       if (size>80) {
+               g_snprintf(buffer, 6, "%02d", gps->data->sat[i].prn);
+               pango_layout_set_text(gps->layout, buffer, -1);
+               pango_layout_get_pixel_size(gps->layout, &x1, &y1);
+               gdk_draw_layout(widget->window, gps->gc_w, x-gps->fs/2-x1/2+2, y-gps->fs/2-y1/2+2, gps->layout);
+       }
 }
 
 return;