1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:45:06 +00:00

LibGUI: Use FileIconProvider in the FilePicker dialog

This commit is contained in:
Andreas Kling 2020-09-16 21:05:49 +02:00
parent e1e58d5bc9
commit d89cad7c57
2 changed files with 9 additions and 6 deletions

View file

@ -25,6 +25,7 @@
*/
#include <AK/String.h>
#include <LibCore/StandardPaths.h>
#include <LibGUI/FileIconProvider.h>
#include <LibGUI/Icon.h>
#include <LibGfx/Bitmap.h>
@ -133,8 +134,11 @@ Icon FileIconProvider::icon_for_path(const String& path, mode_t mode)
initialize_if_needed();
if (path == "/")
return s_hard_disk_icon;
if (S_ISDIR(mode))
if (S_ISDIR(mode)) {
if (path == Core::StandardPaths::home_directory())
return s_home_directory_icon;
return s_directory_icon;
}
if (S_ISLNK(mode))
return s_symlink_icon;
if (S_ISSOCK(mode))