summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorFederico Guerinoni <guerinoni.federico@gmail.com>2021-03-25 22:01:29 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-26 22:59:09 +0100
commit49a062f81d8e943e64a142f3f1f0fe955ebcf470 (patch)
tree22d11e7644ec2b2a080c66e0c1a418320c65f390 /Userland/Libraries/LibGUI
parent8fe7983cc596ebcdb7d3cc26844c4ac7983739ef (diff)
downloadserenity-49a062f81d8e943e64a142f3f1f0fe955ebcf470.zip
LibGUI: Show human readable size in filemanager
The size is visible only in TableView mode of the filemanager.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/FileSystemModel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp
index b04c4cb70d..330daa0fe2 100644
--- a/Userland/Libraries/LibGUI/FileSystemModel.cpp
+++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/LexicalPath.h>
+#include <AK/NumberFormat.h>
#include <AK/QuickSort.h>
#include <AK/StringBuilder.h>
#include <LibCore/DirIterator.h>
@@ -439,7 +440,7 @@ Variant FileSystemModel::data(const ModelIndex& index, ModelRole role) const
case Column::Name:
return node.name;
case Column::Size:
- return (int)node.size;
+ return human_readable_size(node.size);
case Column::Owner:
return name_for_uid(node.uid);
case Column::Group: