mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 18:35:09 +00:00
LibGUI: Show dotfiles with 50% opacity (in FileSystemModel views)
Use the new ModelRole::IconOpacity for this. :^)
This commit is contained in:
parent
8ba47facf6
commit
75a41da69f
1 changed files with 7 additions and 0 deletions
|
@ -515,6 +515,13 @@ Variant FileSystemModel::data(const ModelIndex& index, ModelRole role) const
|
||||||
if (role == ModelRole::Icon) {
|
if (role == ModelRole::Icon) {
|
||||||
return icon_for(node);
|
return icon_for(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (role == ModelRole::IconOpacity) {
|
||||||
|
if (node.name.starts_with('.'))
|
||||||
|
return 0.5f;
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue