[gtk+] fontchooser: Fix size computation



commit af5f593b6d2aacdfa600bee07d446aab41b4d103
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 20 00:30:19 2011 +0200

    fontchooser: Fix size computation

 gtk/gtkfontchooserwidget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index 36d85ac..757ed27 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -321,9 +321,9 @@ spin_change_cb (GtkAdjustment *adjustment,
   gtk_widget_override_font (priv->preview, desc);
 
   if (pango_font_description_get_size_is_absolute (priv->font_desc))
-    pango_font_description_set_absolute_size (priv->font_desc, size);
+    pango_font_description_set_absolute_size (priv->font_desc, size * PANGO_SCALE);
   else
-    pango_font_description_set_size (priv->font_desc, ((gint)size) * PANGO_SCALE);
+    pango_font_description_set_size (priv->font_desc, size * PANGO_SCALE);
 
   gtk_adjustment_set_value (slider_adj, size);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]