summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-29 10:51:46 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-29 11:00:46 +0100
commit3c7f5392a9692693e4db8e667bab99e75fc45006 (patch)
tree7c2a3b4e15322a289e63184ef8933cf2a37ab571 /Userland
parentef06215e7a8f11961a063e63697370fa941b3544 (diff)
downloadserenity-3c7f5392a9692693e4db8e667bab99e75fc45006.zip
SystemMonitor: Trim "VMObject" suffix from VMObject types
Every VMObject type ends in "VMObject" and it's just taking up space.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp b/Userland/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
index d36a7f57ab..bb88ef0e65 100644
--- a/Userland/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
+++ b/Userland/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
@@ -93,7 +93,12 @@ ProcessMemoryMapWidget::ProcessMemoryMapWidget()
builder.append('T');
return builder.to_string();
});
- pid_vm_fields.empend("vmobject", "VMObject type", Gfx::TextAlignment::CenterLeft);
+ pid_vm_fields.empend("VMObject type", Gfx::TextAlignment::CenterLeft, [](auto& object) {
+ auto type = object.get("vmobject").to_string();
+ if (type.ends_with("VMObject"))
+ type = type.substring(0, type.length() - 8);
+ return type;
+ });
pid_vm_fields.empend("Purgeable", Gfx::TextAlignment::CenterLeft, [](auto& object) {
if (object.get("volatile").to_bool())
return "Volatile";