From: Kaj-Michael Lang Date: Thu, 10 Apr 2008 14:59:11 +0000 (+0300) Subject: Don't bother with the satellite number if the view is very small X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363681e432d2ba2dc0f8ff97e8f5e7e4718ec1d1;p=mapper Don't bother with the satellite number if the view is very small --- diff --git a/src/gtkgps.c b/src/gtkgps.c index 5302227..bb7ce04 100644 --- a/src/gtkgps.c +++ b/src/gtkgps.c @@ -395,12 +395,14 @@ for (i=0;idata->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;