mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
FileManager+LibGUI+html: Add an icon to represent HTML files
This also becomes the app icon for the little "html" program. :^)
This commit is contained in:
parent
e38b454e11
commit
3900eebf15
6 changed files with 36 additions and 0 deletions
|
@ -34,6 +34,7 @@ GDirectoryModel::GDirectoryModel()
|
|||
m_executable_icon = GIcon::default_icon("filetype-executable");
|
||||
m_filetype_image_icon = GIcon::default_icon("filetype-image");
|
||||
m_filetype_sound_icon = GIcon::default_icon("filetype-sound");
|
||||
m_filetype_html_icon = GIcon::default_icon("filetype-html");
|
||||
|
||||
setpwent();
|
||||
while (auto* passwd = getpwent())
|
||||
|
@ -159,6 +160,8 @@ GIcon GDirectoryModel::icon_for(const Entry& entry) const
|
|||
return m_executable_icon;
|
||||
if (entry.name.to_lowercase().ends_with(".wav"))
|
||||
return m_filetype_sound_icon;
|
||||
if (entry.name.to_lowercase().ends_with(".html"))
|
||||
return m_filetype_html_icon;
|
||||
if (entry.name.to_lowercase().ends_with(".png")) {
|
||||
if (!entry.thumbnail) {
|
||||
if (!const_cast<GDirectoryModel*>(this)->fetch_thumbnail_for(entry))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue