rpms/cheese/devel cheese-effects-i18n.patch, NONE, 1.1 cheese.spec, 1.76, 1.77
Matthias Clasen
mclasen at fedoraproject.org
Fri Mar 19 19:50:11 UTC 2010
Author: mclasen
Update of /cvs/pkgs/rpms/cheese/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11571
Modified Files:
cheese.spec
Added Files:
cheese-effects-i18n.patch
Log Message:
fix text rendering on the effects tab
cheese-effects-i18n.patch:
cheese-effect-chooser.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
--- NEW FILE cheese-effects-i18n.patch ---
diff --git a/src/cheese-effect-chooser.c b/src/cheese-effect-chooser.c
index 8716117..61aeacb 100644
--- a/src/cheese-effect-chooser.c
+++ b/src/cheese-effect-chooser.c
@@ -178,18 +178,20 @@ cheese_cairo_draw_card (cairo_t *cr, const GstEffect *card, gboolean highlight)
if (card->is_black)
cairo_set_source_rgb (cr, 1, 1, 1);
- double x, y;
- cairo_select_font_face (cr, "Sans",
- CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
-
- cairo_set_font_size (cr, 0.09);
+ PangoLayout *layout = pango_cairo_create_layout (cr);
gchar *name = gettext (card->name);
- cairo_text_extents (cr, name, &extents);
- x = 0.5 - (extents.width / 2 + extents.x_bearing);
- y = 0.92 - (extents.height / 2 + extents.y_bearing);
-
+ pango_layout_set_text (layout, name, -1);
+ PangoFontDescription *desc = pango_font_description_from_string ("Sans 0.09");
+ pango_layout_set_font_description (layout, desc);
+ pango_font_description_free (desc);
+ int width, height;
+ pango_layout_get_size (layout, &width, &height);
+ double x, y;
+ x = 0.5 - ((double)width / PANGO_SCALE) / 2;
+ y = 0.92 - ((double)height / PANGO_SCALE) / 2;
cairo_move_to (cr, x, y);
- cairo_show_text (cr, name);
+ pango_cairo_show_layout (cr, layout);
+ g_object_unref (layout);
if (highlight)
{
Index: cheese.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cheese/devel/cheese.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- cheese.spec 16 Mar 2010 18:02:00 -0000 1.76
+++ cheese.spec 19 Mar 2010 19:50:11 -0000 1.77
@@ -1,6 +1,6 @@
Name: cheese
Version: 2.29.92
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Application for taking pictures and movies from a webcam
Group: Amusements/Graphics
@@ -10,6 +10,8 @@ URL: http://projects.gnome.or
Source0: http://download.gnome.org/sources/cheese/2.29/%{name}-%{version}.tar.bz2
# https://bugzilla.gnome.org/show_bug.cgi?id=613067
Patch0: no-webcam.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=613287
+Patch1: cheese-effects-i18n.patch
BuildRequires: gtk2-devel >= 2.19.1
BuildRequires: dbus-devel
@@ -64,6 +66,7 @@ for writing applications that require a
%prep
%setup -q
%patch0 -p1 -b .no-webcam
+%patch1 -p1 -b .effects-i18n
%build
%configure --disable-static
@@ -167,6 +170,9 @@ fi
%{_libdir}/pkgconfig/cheese-gtk.pc
%changelog
+* Fri Mar 19 2010 Matthias Clasen <mclasen at redhat.com> 2.29.92-3
+- Fix text rendering issues on the effects tab
+
* Tue Mar 16 2010 Matthias Clasen <mclasen at redhat.com> 2.29.92-2
- Use an existing icon
More information about the scm-commits
mailing list