[evince] shell: Reduce from two to one digit zoom precision
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Reduce from two to one digit zoom precision
- Date: Sun, 8 Jul 2018 14:17:46 +0000 (UTC)
commit e921c96c3145814e16423173c375b16ba2912b6e
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Tue Jul 3 13:23:49 2018 -0400
shell: Reduce from two to one digit zoom precision
shell/ev-zoom-action.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/shell/ev-zoom-action.c b/shell/ev-zoom-action.c
index af2482cd..297e7be0 100644
--- a/shell/ev-zoom-action.c
+++ b/shell/ev-zoom-action.c
@@ -95,10 +95,10 @@ ev_zoom_action_set_zoom_level (EvZoomAction *zoom_action,
}
zoom_perc = zoom * 100.;
- if (ABS ((gint)zoom_perc - zoom_perc) < 0.001)
+ if (ABS ((gint)zoom_perc - zoom_perc) < 0.01)
zoom_str = g_strdup_printf ("%d%%", (gint)zoom_perc);
else
- zoom_str = g_strdup_printf ("%.2f%%", zoom_perc);
+ zoom_str = g_strdup_printf ("%.1f%%", zoom_perc);
gtk_entry_set_text (GTK_ENTRY (zoom_action->priv->entry), zoom_str);
g_free (zoom_str);
}
@@ -141,8 +141,8 @@ static void
ev_zoom_action_set_width_chars (EvZoomAction *zoom_action,
gint width)
{
- /* width + 3 (two decimals and the comma) + 3 (for the icon) */
- gtk_entry_set_width_chars (GTK_ENTRY (zoom_action->priv->entry), width + 3 + 3);
+ /* width + 2 (one decimals and the comma) + 3 (for the icon) */
+ gtk_entry_set_width_chars (GTK_ENTRY (zoom_action->priv->entry), width + 2 + 3);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]