LibGUI: Show dotfiles with 50% opacity (in FileSystemModel views)

Use the new ModelRole::IconOpacity for this. :^)
This commit is contained in:
Andreas Kling 2021-07-27 17:24:45 +02:00
parent 8ba47facf6
commit 75a41da69f

View file

@ -515,6 +515,13 @@ Variant FileSystemModel::data(const ModelIndex& index, ModelRole role) const
if (role == ModelRole::Icon) {
return icon_for(node);
}
if (role == ModelRole::IconOpacity) {
if (node.name.starts_with('.'))
return 0.5f;
return {};
}
return {};
}