mirror of https://github.com/aristocratos/btop.git
Fixed: Memory values not clearing properly when not in graph mode in mem box
This commit is contained in:
parent
7190cf4be6
commit
90034156dd
|
@ -824,10 +824,11 @@ namespace Mem {
|
|||
|
||||
if (title.empty()) title = capitalize(name);
|
||||
const string humanized = floating_humanizer(mem.stats.at(name));
|
||||
const int offset = max(0, divider.empty() ? 9 - (int)humanized.size() : 0);
|
||||
const string graphics = (use_graphs ? mem_graphs.at(name)(mem.percent.at(name), redraw or data_same) : mem_meters.at(name)(mem.percent.at(name).back()));
|
||||
if (mem_size > 2) {
|
||||
out += Mv::to(y+1+cy, x+1+cx) + divider + title.substr(0, big_mem ? 10 : 5) + ":"
|
||||
+ Mv::to(y+1+cy, x+cx + mem_width - 2 - humanized.size()) + trans(humanized)
|
||||
+ Mv::to(y+1+cy, x+cx + mem_width - 2 - humanized.size()) + (divider.empty() ? Mv::l(offset) + string(" ") * offset + humanized : trans(humanized))
|
||||
+ Mv::to(y+2+cy, x+cx + (graph_height >= 2 ? 0 : 1)) + graphics + up + rjust(to_string(mem.percent.at(name).back()) + "%", 4);
|
||||
cy += (graph_height == 0 ? 2 : graph_height + 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue