summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/FileSystemModel.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-09-16 20:57:08 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-16 21:08:55 +0200
commit31b65145b665c2bf762dca12c0e15fdfa74dbf1a (patch)
tree3ec975a8a9bb5c27b837fed4e13da9ba74637327 /Libraries/LibGUI/FileSystemModel.cpp
parent17ae1c37bbd21ae5de691c5dded61d017260f92c (diff)
downloadserenity-31b65145b665c2bf762dca12c0e15fdfa74dbf1a.zip
LibGUI+Base: Add a hard-disk icon and use it for the path "/"
Diffstat (limited to 'Libraries/LibGUI/FileSystemModel.cpp')
-rw-r--r--Libraries/LibGUI/FileSystemModel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibGUI/FileSystemModel.cpp b/Libraries/LibGUI/FileSystemModel.cpp
index 690258c091..a1e9360fbe 100644
--- a/Libraries/LibGUI/FileSystemModel.cpp
+++ b/Libraries/LibGUI/FileSystemModel.cpp
@@ -463,6 +463,9 @@ Variant FileSystemModel::data(const ModelIndex& index, ModelRole role) const
Icon FileSystemModel::icon_for(const Node& node) const
{
+ if (node.full_path() == "/")
+ return FileIconProvider::icon_for_path("/");
+
if (Gfx::Bitmap::is_path_a_supported_image_format(node.name.to_lowercase())) {
if (!node.thumbnail) {
if (!const_cast<FileSystemModel*>(this)->fetch_thumbnail_for(node))