diff -urN cui69/cui_test.c cui70/cui_test.c --- cui69/cui_test.c Sun Feb 9 00:00:00 2014 +++ cui70/cui_test.c Sun Feb 9 22:00:00 2014 @@ -80,7 +80,11 @@ { static char buf[16]; + cui_hide(obj); + cui_draw(obj->parent); cui_y_set(obj, obj->y + 1); + cui_show(obj); + sprintf(buf, "%d", cui_gy(obj)); cui_label_str_set((cui)prm, buf); return TRUE; diff -urN cui69/scbar.c cui70/scbar.c --- cui69/scbar.c Sun Feb 9 00:00:00 2014 +++ cui70/scbar.c Sun Feb 9 22:00:00 2014 @@ -37,8 +37,7 @@ { cui_scbar p = (cui_scbar)obj; int pos_max = cui_scbar_thumb_pos_max(obj); - int add100 = 100 * p->max_v * (pos_max + 1) / pos_max - 100 * p->max_v; - return p->v * (pos_max +1) * 100 / (p->max_v*100 + add100); + return p->v * (pos_max + 1) / (p->max_v + 1); } int @@ -46,8 +45,7 @@ { cui_scbar p = (cui_scbar)obj; int pos_max = cui_scbar_thumb_pos_max(obj); - int add100 = 100 * p->max_v * (pos_max + 1) / pos_max - 100 * p->max_v; - return (pos * (p->max_v*100 + add100) * 2 + (p->max_v*100 + add100)) / ((pos_max + 1) * 100 * 2); + return pos * p->max_v / pos_max; } void