ProcessController: fix replicant for 12 CPUs

* Slightly change the formula for bigger sizes (use real width).

Change-Id: I66204c2727f30e3f139b506174e287811c258fa9
Reviewed-on: https://review.haiku-os.org/704
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
Kacper Kasper 2018-11-17 12:29:19 +01:00 committed by Axel Dörfler
parent a6a1266240
commit 35dbbd990c

View File

@ -609,15 +609,15 @@ ProcessController::DoDraw(bool force)
float barWidth;
float barGap;
float memWidth;
if (gCPUcount < 12 && bounds.Width() == 15) {
if (gCPUcount <= 12 && bounds.Width() == 15) {
// Use fixed sizes for small icon sizes
barWidth = layout[gCPUcount].cpu_width;
barGap = layout[gCPUcount].cpu_inter;
memWidth = layout[gCPUcount].mem_width;
} else {
memWidth = floorf((bounds.Height() + 1) / 8);
barGap = bounds.Width() / gCPUcount > 3 ? 1 : 0;
barWidth = floorf((bounds.Width() - 2 - memWidth - barGap * gCPUcount)
barGap = ((bounds.Width() + 1) / gCPUcount) > 3 ? 1 : 0;
barWidth = floorf((bounds.Width() - 1 - memWidth - barGap * gCPUcount)
/ gCPUcount);
}
// interspace