ProcessController: swap drawing of (system) committed and cached memory.

The menu item starts with: "System resources & caches..." but then it
wrote fCachedMemory before fCommittedMemory.

Swapping them seems more in line with how the rest of the "Memory usage"
menu is presented as well.

Change-Id: I83345f9ae35b405ed854e7a1992b537d31e27d02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9083
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Oscar Lesta
2025-03-06 16:42:35 +00:00
committed by waddlesplash
parent b3d011b90a
commit 8ab7b2bd56
@@ -139,13 +139,16 @@ KernelMemoryBarMenuItem::DrawBar(bool force)
menu->SetHighColor(highColor);
char infos[128];
string_for_size(fCachedMemory * 1024.0, infos, sizeof(infos));
BPoint loc(cadre.left, cadre.bottom + 1);
string_for_size(fCommittedMemory * 1024.0, infos, sizeof(infos));
loc.x -= kMargin + gMemoryTextWidth / 2 + menu->StringWidth(infos);
menu->DrawString(infos, loc);
string_for_size(fCommittedMemory * 1024.0, infos, sizeof(infos));
string_for_size(fCachedMemory * 1024.0, infos, sizeof(infos));
loc.x = cadre.left - kMargin - menu->StringWidth(infos);
menu->DrawString(infos, loc);
fLastSum = sum;
}
}