File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1969,11 +1969,7 @@ namespace Proc {
19691969 const int item_width = floor ((double )(d_width - 2 ) / min (item_fit, 8 ));
19701970
19711971 // ? Graph part of box
1972- string cpu_str = (alive or pause_proc_list ? fmt::format (" {:.2f}" , detailed.entry .cpu_p ) : " " );
1973- if (alive or pause_proc_list) {
1974- cpu_str.resize (4 );
1975- if (cpu_str.ends_with (' .' )) { cpu_str.pop_back (); cpu_str.pop_back (); }
1976- }
1972+ string cpu_str = (alive or pause_proc_list ? fmt::format (" {:>4.{}f}" , detailed.entry .cpu_p , detailed.entry .cpu_p < 9 .995f ? 2 : detailed.entry .cpu_p < 99 .95f ? 1 : 0 ) : " " );
19771973 out += Mv::to (d_y + 1 , dgraph_x + 1 ) + Fx::ub + detailed_cpu_graph (detailed.cpu_percent , (redraw or data_same or not alive))
19781974 + Mv::to (d_y + 1 , dgraph_x + 1 ) + Theme::c (" title" ) + Fx::b + rjust (cpu_str, 4 ) + " %" ;
19791975 for (int i = 0 ; const auto & l : {' C' , ' P' , ' U' })
You can’t perform that action at this time.
0 commit comments