diff options
| author | Richard Hughes <richard@hughsie.com> | 2012-03-26 16:48:23 (GMT) |
|---|---|---|
| committer | Richard Hughes <richard@hughsie.com> | 2012-04-04 13:37:28 (GMT) |
| commit | 9eb047baff69f78273e0be20c42c06cde7a2e27f (patch) | |
| tree | ca278c729890f59e82d0c1e4507e0e234d53a667 | |
| parent | 13b534adb86ad601e7f637d6543e636b3b76092b (diff) | |
| download | gnome-control-center-9eb047baff69f78273e0be20c42c06cde7a2e27f.zip gnome-control-center-9eb047baff69f78273e0be20c42c06cde7a2e27f.tar.xz | |
Always round up the CcStrengthBar rather than down
It's a measure of completeness, not of progress.
| -rw-r--r-- | shell/cc-strength-bar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/cc-strength-bar.c b/shell/cc-strength-bar.c index 1b9b4aa..ed1f28e 100644 --- a/shell/cc-strength-bar.c +++ b/shell/cc-strength-bar.c @@ -26,6 +26,7 @@ #include <glib.h> #include <glib/gi18n.h> #include <gtk/gtk.h> +#include <math.h> #include "cc-strength-bar.h" @@ -254,7 +255,7 @@ cc_strength_bar_draw (GtkWidget *widget, /* print the bar */ section_width = (width - (padding_end * 2) + 2) / (gdouble) bar->priv->segments; - count = bar->priv->fraction * (gdouble) bar->priv->segments; + count = ceil (bar->priv->fraction * (gdouble) bar->priv->segments); last_x = -padding_x + padding_end; for (i = 0; i < count; i++) { |