From 3f805cf3473c09b999e37b3fc4974fbcc562e9b3 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Sun, 5 Sep 2021 08:46:01 +0200 Subject: Highlight large percentages similar to large memory columns --- Process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Process.c b/Process.c index 475d23d5..6ecd217c 100644 --- a/Process.c +++ b/Process.c @@ -715,8 +715,10 @@ void Process_printPercentage(float val, char* buffer, int n, int* attr) { } xSnprintf(buffer, n, "%4.1f ", val); } else if (val < 999) { + *attr = CRT_colors[PROCESS_MEGABYTES]; xSnprintf(buffer, n, "%3d. ", (int)val); } else { + *attr = CRT_colors[PROCESS_GIGABYTES]; xSnprintf(buffer, n, "%4d ", (int)val); } } else { -- cgit v1.2.3 From be82448bd5adcfe5d05d980c7a05bc9655443fe8 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 14 Sep 2021 11:16:34 +1000 Subject: Process_printPercentage using one color transition Update Process_printPercentage such that color change happens only once at 100% and beyond. --- Process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Process.c b/Process.c index 6ecd217c..556acf42 100644 --- a/Process.c +++ b/Process.c @@ -718,7 +718,7 @@ void Process_printPercentage(float val, char* buffer, int n, int* attr) { *attr = CRT_colors[PROCESS_MEGABYTES]; xSnprintf(buffer, n, "%3d. ", (int)val); } else { - *attr = CRT_colors[PROCESS_GIGABYTES]; + *attr = CRT_colors[PROCESS_MEGABYTES]; xSnprintf(buffer, n, "%4d ", (int)val); } } else { -- cgit v1.2.3