Commit a537577
committed
CPUMeter: Improve spacing between sub-meter algorithm
The new algorithm will make the meter bars aligned when groups of CPU
meters with 2, 4 and 8 sub-columns are placed together in one larger
column. It utilizes the fact that the number of sub-columns of CPU
meters are in power of 2 only, and calculates spacing with bit tricks.
Signed-off-by: Kang-Che Sung <[email protected]>1 parent 987a47f commit a537577
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
314 | 318 | | |
315 | 319 | | |
316 | 320 | | |
| |||
0 commit comments