netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=7a2d1f0e48574ebf5c96fa813504a7773db5c206

commit 7a2d1f0e48574ebf5c96fa813504a7773db5c206
Author: Alastair Poole <m...@alastairpoole.com>
Date:   Wed Nov 3 20:15:59 2021 +0000

    bars: minimum h
---
 src/bin/ui/visuals/cpu_bars.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/visuals/cpu_bars.c b/src/bin/ui/visuals/cpu_bars.c
index bb7b7e0..6efa12c 100644
--- a/src/bin/ui/visuals/cpu_bars.c
+++ b/src/bin/ui/visuals/cpu_bars.c
@@ -19,7 +19,7 @@ _core_times_main_cb(void *data, Ecore_Thread *thread)
 
    while (!ecore_thread_check(thread))
      {
-        cpu_core_t **cores = system_cpu_usage_delayed_get(&ncpu, 400000);
+        cpu_core_t **cores = system_cpu_usage_delayed_get(&ncpu, 100000);
         Core *cores_out = calloc(ncpu, sizeof(Core));
 
         if (cores_out)
@@ -62,9 +62,11 @@ _core_times_feedback_cb(void *data, Ecore_Thread *thread 
EINA_UNUSED, void *msgd
         Evas_Object *rec = eina_list_nth(ext->objects, i);
         evas_object_geometry_get(rec, &ox, NULL, NULL, NULL);
         int c = temp_colormap[core->percent & 0xff];
+        int h = core->percent * step;
+        if (!h) h = 1;
         evas_object_color_set(rec, RVAL(c), GVAL(c), BVAL(c), AVAL(c));
-        evas_object_resize(rec, ELM_SCALE_SIZE(BAR_WIDTH), 
ELM_SCALE_SIZE(core->percent * step));
-        evas_object_move(rec, ox, oy - ELM_SCALE_SIZE(core->percent * step));
+        evas_object_resize(rec, ELM_SCALE_SIZE(BAR_WIDTH), ELM_SCALE_SIZE(h));
+        evas_object_move(rec, ox, oy - ELM_SCALE_SIZE(h));
         elm_table_align_set(ext->tb, 0.0, 1.0);
      }
 

-- 


Reply via email to