mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibGUI: Show dotfiles with 50% opacity (in FileSystemModel views)
Use the new ModelRole::IconOpacity for this. :^)
This commit is contained in:
@@ -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 {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user