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:
parent
a6a1266240
commit
35dbbd990c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user