From 3c7f5392a9692693e4db8e667bab99e75fc45006 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 29 Jan 2021 10:51:46 +0100 Subject: [PATCH] SystemMonitor: Trim "VMObject" suffix from VMObject types Every VMObject type ends in "VMObject" and it's just taking up space. --- .../Applications/SystemMonitor/ProcessMemoryMapWidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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";