]> err.no Git - mapper/commitdiff
A bit nicer
authorKaj-Michael Lang <milang@angel.tal.org>
Wed, 3 Oct 2007 16:05:26 +0000 (19:05 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Wed, 3 Oct 2007 16:05:26 +0000 (19:05 +0300)
src/gtkgps.c

index bd0a0e54e9b8ac95ba46c0bb0a93ff7a19460406..20ef94ed0fdde5b7a954ba32d7541fdf9916aa3b 100644 (file)
@@ -208,10 +208,10 @@ gps->width=allocation->width;
 gps->height=allocation->height;
 gps->size=MIN(gps->width, gps->height);
 
-gps->fs=gps->size/20;
-BOUND(gps->fs, 8, 20);
+gps->fs=gps->size/22;
+BOUND(gps->fs, 10, 24);
 
-pango_font_description_set_size(gps->fontdesc, (gps->fs-1)*PANGO_SCALE);
+pango_font_description_set_size(gps->fontdesc, (gps->fs-3)*PANGO_SCALE);
 pango_layout_set_font_description(gps->layout, gps->fontdesc);
 }
 
@@ -340,7 +340,7 @@ for (i = 0; i < 6; i++) {
                      yoffset + halfsize + (halfsize - 2) * cosf(tmp));
 }
 
-if (size > 140) {
+if (size>100) {
 for (i = 0; i < 12; i++) {
        tmp = (line[i] * (1.f / 180.f)) * G_PI;
        /* azimuth */
@@ -379,18 +379,18 @@ gdk_draw_layout(widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
 
 for (i=0;i<gps->data->satinview;i++) {
        /* Sat used or not */
-       gc=(gps->data->sat[i].fix) ? gps->gc_sf : gps->gc_s;
+       gc=(gps->data->sat[i].fix==TRUE) ? gps->gc_sf : gps->gc_s;
 
        tmp = (gps->data->sat[i].azimuth * (1.f / 180.f)) * G_PI;
        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+4, gps->fs+4, 0, 64 * 360);
+       gdk_draw_arc(widget->window, gc, TRUE, x-gps->fs, y-gps->fs, gps->fs+8, gps->fs+8, 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, y-gps->fs/2-y1/2, gps->layout);
+       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;