[gnome-system-monitor] Patch to properly normalise the y axis in the CPU history graph (Resources tab)



commit 14b5e5dba1bd659c67affa6774471d555c47e9de
Author: Guido Trentalancia <guido trentalancia net>
Date:   Wed May 18 20:48:00 2016 +0000

    Patch to properly normalise the y axis in the CPU history graph (Resources tab)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748999

 src/load-graph.cpp |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 21c7142..a644e4e 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -119,11 +119,7 @@ void draw_background(LoadGraph *graph) {
             caption = g_strdup(captionstr.c_str());
         } else {
             // operation orders matters so it's 0 if i == num_bars
-            guint max = 100;
-            if (graph->type == LOAD_GRAPH_CPU && !GsmApplication::get()->config.solaris_mode) {
-                max = 100 * graph->n;
-            }
-            caption = g_strdup_printf("%d %%", max - i * (max / num_bars));
+            caption = g_strdup_printf("%d %%", 100 - i * (100 / num_bars));
         }
         pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT);
         pango_layout_set_text (layout, caption, -1);


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