]> git.sur5r.net Git - glabels/commitdiff
Tweak rendering of color swatches and font samples.
authorJim Evins <evins@snaught.com>
Sat, 29 May 2010 21:27:46 +0000 (17:27 -0400)
committerJim Evins <evins@snaught.com>
Sat, 29 May 2010 21:27:46 +0000 (17:27 -0400)
src/color-swatch.c
src/font-sample.c

index b068e6c6bc923e1c3fccc29c19b9cf5de9113e99..19f4ed691899a620adc631cea75262dd625be9ba 100644 (file)
@@ -251,7 +251,7 @@ draw_swatch (glColorSwatch *this,
                 line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]);
         }
 
-        cairo_rectangle( cr, 0, 0, w-1, h-1 );
+        cairo_rectangle( cr, 1, 1, w-2, h-2 );
 
         cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color));
         cairo_fill_preserve( cr );
index 4302064981beb4d7eeb1d5aedc048aa173bd3f39..ea1f5b7ace3c23a33861b6e26c4799ba406f456f 100644 (file)
@@ -246,7 +246,7 @@ draw_sample (glFontSample *this,
 
         cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
 
-        cairo_rectangle( cr, 0, 0, w-1, h-1 );
+        cairo_rectangle( cr, 1, 1, w-2, h-2 );
 
         cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color));
         cairo_fill_preserve( cr );
@@ -265,7 +265,7 @@ draw_sample (glFontSample *this,
         pango_font_description_set_family (desc, this->priv->font_family);
         pango_font_description_set_weight (desc, PANGO_WEIGHT_NORMAL);
         pango_font_description_set_style  (desc, PANGO_STYLE_NORMAL);
-        pango_font_description_set_size   (desc, 0.6 * h * PANGO_SCALE);
+        pango_font_description_set_size   (desc, 0.6 * (h-1) * PANGO_SCALE);
         
         pango_layout_set_font_description (layout, desc);
         pango_font_description_free       (desc);