mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 01:54:57 +00:00
LibGUI+Base: Add a hard-disk icon and use it for the path "/"
This commit is contained in:
parent
17ae1c37bb
commit
31b65145b6
3 changed files with 7 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue