mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
window: use floor() instead of ceil()
Otherwise we get 111% instead of 110%.
This commit is contained in:
@ -724,7 +724,7 @@ zoom_level_to_string (GBinding *binding,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gdouble percent = 100.0 * g_value_get_double (from_value);
|
gdouble percent = 100.0 * g_value_get_double (from_value);
|
||||||
g_value_take_string (to_value, g_strdup_printf ("%u%%", (guint)ceil (percent)));
|
g_value_take_string (to_value, g_strdup_printf ("%u%%", (guint)floor (percent)));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user