diff options
author | Andreas Kling <kling@serenityos.org> | 2020-09-16 20:57:08 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-16 21:08:55 +0200 |
commit | 31b65145b665c2bf762dca12c0e15fdfa74dbf1a (patch) | |
tree | 3ec975a8a9bb5c27b837fed4e13da9ba74637327 /Libraries/LibGUI/FileSystemModel.cpp | |
parent | 17ae1c37bbd21ae5de691c5dded61d017260f92c (diff) | |
download | serenity-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.cpp | 3 |
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)) |