ProcessController: Fix static scaling mode after hrev54874
* We saw a "big" cpu bar on 1 core. * This was because adding 8 to the static "15" width resulted in the static CPU sizing code getting disabled * Converting this to 4 just completely disabled the static scaling code and made dynamic always enabled Change-Id: Ida8c718c0d0a2fcf72aedbf525daad040d5b3678
This commit is contained in:
parent
b181ea960c
commit
b1b6769b6f
@ -31,14 +31,16 @@ PCWindow::PCWindow()
|
||||
|
||||
system_info info;
|
||||
get_system_info(&info);
|
||||
int width = 4;
|
||||
if (info.cpu_count > 4)
|
||||
width = info.cpu_count;
|
||||
if (info.cpu_count <= 16)
|
||||
width *= 2;
|
||||
|
||||
// For the memory bar
|
||||
width += 8;
|
||||
int width = 15;
|
||||
// Over 4 cpus, flip to "dynamic size mode"
|
||||
if (info.cpu_count > 4) {
|
||||
width = info.cpu_count;
|
||||
// For the memory bar
|
||||
width += 4;
|
||||
if (info.cpu_count <= 16)
|
||||
width *= 2;
|
||||
}
|
||||
|
||||
BRect rect = Bounds();
|
||||
|
||||
|
@ -130,14 +130,16 @@ instantiate_deskbar_item(float maxWidth, float maxHeight)
|
||||
|
||||
system_info info;
|
||||
get_system_info(&info);
|
||||
int width = 4;
|
||||
if (info.cpu_count > 4)
|
||||
width = info.cpu_count;
|
||||
if (info.cpu_count <= 16)
|
||||
width *= 2;
|
||||
|
||||
// For the memory bar
|
||||
width += 8;
|
||||
int width = 15;
|
||||
// Over 4 cpus, flip to "dynamic size mode"
|
||||
if (info.cpu_count > 4) {
|
||||
width = info.cpu_count;
|
||||
// For the memory bar
|
||||
width += 4;
|
||||
if (info.cpu_count <= 16)
|
||||
width *= 2;
|
||||
}
|
||||
|
||||
// Damn, you got a lot of CPU
|
||||
if (width > maxWidth)
|
||||
|
Loading…
Reference in New Issue
Block a user