[gtk+] GtkFontButton: Limit the decimals shown for size
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFontButton: Limit the decimals shown for size
- Date: Fri, 15 Aug 2014 19:10:40 +0000 (UTC)
commit 1815790bd3c9d4c275976b3fae4da1bff6308dc0
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 15 15:09:45 2014 -0400
GtkFontButton: Limit the decimals shown for size
It doesn't make sense to show a font size with 6 digits. Use
the same formatting we use in the font chooser widget now.
https://bugzilla.gnome.org/show_bug.cgi?id=724996
gtk/gtkfontbutton.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 22cca74..cb0822f 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -1160,7 +1160,7 @@ gtk_font_button_update_font_info (GtkFontButton *font_button)
if (font_button->priv->show_size)
{
/* mirror Pango, which doesn't translate this either */
- gchar *size = g_strdup_printf ("%g%s",
+ gchar *size = g_strdup_printf ("%2.4g%s",
pango_font_description_get_size (priv->font_desc) / (double)PANGO_SCALE,
pango_font_description_get_size_is_absolute (priv->font_desc) ? "px" :
"");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]