From: Jim Evins Date: Sat, 29 May 2010 21:27:46 +0000 (-0400) Subject: Tweak rendering of color swatches and font samples. X-Git-Tag: glabels-2_3_0~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1990055cc0190e23fc0796ff04c00678b68faba3;p=glabels Tweak rendering of color swatches and font samples. --- diff --git a/src/color-swatch.c b/src/color-swatch.c index b068e6c6..19f4ed69 100644 --- a/src/color-swatch.c +++ b/src/color-swatch.c @@ -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 ); diff --git a/src/font-sample.c b/src/font-sample.c index 43020649..ea1f5b7a 100644 --- a/src/font-sample.c +++ b/src/font-sample.c @@ -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);