mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05: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) {
|
||||
return icon_for(node);
|
||||
}
|
||||
|
||||
if (role == ModelRole::IconOpacity) {
|
||||
if (node.name.starts_with('.'))
|
||||
return 0.5f;
|
||||
return {};
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue