mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Resources: Added filetype icon for object, library, text and unknown.
This commit is contained in:
committed by
Andreas Kling
parent
0f91045008
commit
694e4e9168
@@ -212,6 +212,8 @@ FileSystemModel::FileSystemModel(const StringView& root_path, Mode mode)
|
||||
m_filetype_javascript_icon = Icon::default_icon("filetype-javascript");
|
||||
m_filetype_text_icon = Icon::default_icon("filetype-text");
|
||||
m_filetype_pdf_icon = Icon::default_icon("filetype-pdf");
|
||||
m_filetype_library_icon = Icon::default_icon("filetype-library");
|
||||
m_filetype_object_icon = Icon::default_icon("filetype-object");
|
||||
|
||||
setpwent();
|
||||
while (auto* passwd = getpwent())
|
||||
@@ -440,6 +442,10 @@ Icon FileSystemModel::icon_for_file(const mode_t mode, const String& name) const
|
||||
return m_filetype_text_icon;
|
||||
if (name.to_lowercase().ends_with(".pdf"))
|
||||
return m_filetype_pdf_icon;
|
||||
if (name.to_lowercase().ends_with(".o") || name.to_lowercase().ends_with(".obj"))
|
||||
return m_filetype_object_icon;
|
||||
if (name.to_lowercase().ends_with(".so") || name.to_lowercase().ends_with(".a"))
|
||||
return m_filetype_library_icon;
|
||||
|
||||
return m_file_icon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user