mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Resources: Added filetype icon for object, library, text and unknown.
This commit is contained in:
parent
0f91045008
commit
694e4e9168
6 changed files with 8 additions and 1 deletions
BIN
Base/res/icons/16x16/filetype-library.png
Normal file
BIN
Base/res/icons/16x16/filetype-library.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 310 B |
BIN
Base/res/icons/16x16/filetype-object.png
Normal file
BIN
Base/res/icons/16x16/filetype-object.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 247 B |
BIN
Base/res/icons/32x32/filetype-text.png
Normal file
BIN
Base/res/icons/32x32/filetype-text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 297 B |
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 231 B |
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -155,12 +155,13 @@ private:
|
|||
GUI::Icon m_filetype_image_icon;
|
||||
GUI::Icon m_filetype_sound_icon;
|
||||
GUI::Icon m_filetype_html_icon;
|
||||
|
||||
GUI::Icon m_filetype_cplusplus_icon;
|
||||
GUI::Icon m_filetype_java_icon;
|
||||
GUI::Icon m_filetype_javascript_icon;
|
||||
GUI::Icon m_filetype_text_icon;
|
||||
GUI::Icon m_filetype_pdf_icon;
|
||||
GUI::Icon m_filetype_library_icon;
|
||||
GUI::Icon m_filetype_object_icon;
|
||||
|
||||
unsigned m_thumbnail_progress { 0 };
|
||||
unsigned m_thumbnail_progress_total { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue