hrev52542 adds 1 changeset to branch 'master'
old head: a6a126624030cdb616f2b71525e1fca827a41037
new head: 35dbbd990c04bc12671d2684b2521231cc5265cd
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=35dbbd990c04+%5Ea6a126624030
----------------------------------------------------------------------------
35dbbd990c04: 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@xxxxxxxxxxxxxxxx>
[ Kacper Kasper <kacperkasper@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev52542
Commit: 35dbbd990c04bc12671d2684b2521231cc5265cd
URL: https://git.haiku-os.org/haiku/commit/?id=35dbbd990c04
Author: Kacper Kasper <kacperkasper@xxxxxxxxx>
Date: Sat Nov 17 11:29:19 2018 UTC
Committer: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Nov 17 16:30:45 2018 UTC
----------------------------------------------------------------------------
1 file changed, 3 insertions(+), 3 deletions(-)
src/apps/processcontroller/ProcessController.cpp | 6 +++---
----------------------------------------------------------------------------
diff --git a/src/apps/processcontroller/ProcessController.cpp
b/src/apps/processcontroller/ProcessController.cpp
index a1d67f47f9..69b909862f 100644
--- a/src/apps/processcontroller/ProcessController.cpp
+++ b/src/apps/processcontroller/ProcessController.cpp
@@ -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