mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibGUI: Show dotfiles with 50% opacity (in FileSystemModel views)
Use the new ModelRole::IconOpacity for this. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 08:02:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/75a41da69f7
@@ -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