diff options
-rw-r--r-- | Applications/FileManager/DirectoryModel.cpp | 12 | ||||
-rw-r--r-- | Applications/Launcher/main.cpp | 2 | ||||
-rw-r--r-- | Base/res/icons/32x32/filetype-folder.png (renamed from Base/res/icons/32x32/folder.png) | bin | 879 -> 879 bytes | |||
-rw-r--r-- | Base/res/icons/32x32/filetype-unknown.png (renamed from Base/res/icons/32x32/file.png) | bin | 272 -> 272 bytes | |||
-rw-r--r-- | Base/res/icons/executable16.png | bin | 223 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/file16.png | bin | 1115 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/folder16.png | bin | 5639 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/folder32.png | bin | 904 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/link16.png | bin | 5356 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/socket16.png | bin | 335 -> 0 bytes | |||
-rw-r--r-- | Base/res/icons/trash16.png | bin | 335 -> 0 bytes | |||
-rw-r--r-- | LibGUI/GIcon.cpp | 7 | ||||
-rw-r--r-- | LibGUI/GIcon.h | 2 |
13 files changed, 16 insertions, 7 deletions
diff --git a/Applications/FileManager/DirectoryModel.cpp b/Applications/FileManager/DirectoryModel.cpp index f4221ee516..cb5e96167b 100644 --- a/Applications/FileManager/DirectoryModel.cpp +++ b/Applications/FileManager/DirectoryModel.cpp @@ -57,12 +57,12 @@ DirectoryModel::DirectoryModel() { create_thread(thumbnail_thread, this); - m_directory_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/folder16.png"), GraphicsBitmap::load_from_file("/res/icons/32x32/folder.png")); - m_file_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/file16.png"), GraphicsBitmap::load_from_file("/res/icons/32x32/file.png")); - m_symlink_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/link16.png")); - m_socket_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/socket16.png")); - m_executable_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/executable16.png"), GraphicsBitmap::load_from_file("/res/icons/32x32/filetype-executable.png")); - m_filetype_image_icon = GIcon(GraphicsBitmap::load_from_file("/res/icons/16x16/filetype-image.png"), GraphicsBitmap::load_from_file("/res/icons/32x32/filetype-image.png")); + m_directory_icon = GIcon::default_icon("filetype-folder"); + m_file_icon = GIcon::default_icon("filetype-unknown"); + m_symlink_icon = GIcon::default_icon("filetype-symlink"); + m_socket_icon = GIcon::default_icon("filetype-socket"); + m_executable_icon = GIcon::default_icon("filetype-executable"); + m_filetype_image_icon = GIcon::default_icon("filetype-image"); setpwent(); while (auto* passwd = getpwent()) diff --git a/Applications/Launcher/main.cpp b/Applications/Launcher/main.cpp index b28b6887f1..5b27f2f8f6 100644 --- a/Applications/Launcher/main.cpp +++ b/Applications/Launcher/main.cpp @@ -71,7 +71,7 @@ GWindow* make_launcher_window() new LauncherButton("/res/icons/Terminal.png", "/bin/Terminal", widget); new LauncherButton("/res/icons/FontEditor.png", "/bin/FontEditor", widget); - new LauncherButton("/res/icons/folder32.png", "/bin/FileManager", widget); + new LauncherButton("/res/icons/32x32/filetype-folder.png", "/bin/FileManager", widget); new LauncherButton("/res/icons/TextEditor.png", "/bin/TextEditor", widget); return window; diff --git a/Base/res/icons/32x32/folder.png b/Base/res/icons/32x32/filetype-folder.png Binary files differindex 4669c9d7f2..4669c9d7f2 100644 --- a/Base/res/icons/32x32/folder.png +++ b/Base/res/icons/32x32/filetype-folder.png diff --git a/Base/res/icons/32x32/file.png b/Base/res/icons/32x32/filetype-unknown.png Binary files differindex 3651c6a8f9..3651c6a8f9 100644 --- a/Base/res/icons/32x32/file.png +++ b/Base/res/icons/32x32/filetype-unknown.png diff --git a/Base/res/icons/executable16.png b/Base/res/icons/executable16.png Binary files differdeleted file mode 100644 index 8de7113e14..0000000000 --- a/Base/res/icons/executable16.png +++ /dev/null diff --git a/Base/res/icons/file16.png b/Base/res/icons/file16.png Binary files differdeleted file mode 100644 index bb4e84f9e3..0000000000 --- a/Base/res/icons/file16.png +++ /dev/null diff --git a/Base/res/icons/folder16.png b/Base/res/icons/folder16.png Binary files differdeleted file mode 100644 index be55ca059d..0000000000 --- a/Base/res/icons/folder16.png +++ /dev/null diff --git a/Base/res/icons/folder32.png b/Base/res/icons/folder32.png Binary files differdeleted file mode 100644 index cdb813a7f0..0000000000 --- a/Base/res/icons/folder32.png +++ /dev/null diff --git a/Base/res/icons/link16.png b/Base/res/icons/link16.png Binary files differdeleted file mode 100644 index c8b03fc3b3..0000000000 --- a/Base/res/icons/link16.png +++ /dev/null diff --git a/Base/res/icons/socket16.png b/Base/res/icons/socket16.png Binary files differdeleted file mode 100644 index 94f0a2ffbc..0000000000 --- a/Base/res/icons/socket16.png +++ /dev/null diff --git a/Base/res/icons/trash16.png b/Base/res/icons/trash16.png Binary files differdeleted file mode 100644 index 6f07593786..0000000000 --- a/Base/res/icons/trash16.png +++ /dev/null diff --git a/LibGUI/GIcon.cpp b/LibGUI/GIcon.cpp index 16224f1a97..0a2955ee7f 100644 --- a/LibGUI/GIcon.cpp +++ b/LibGUI/GIcon.cpp @@ -61,3 +61,10 @@ void GIconImpl::set_bitmap_for_size(int size, RetainPtr<GraphicsBitmap>&& bitmap } m_bitmaps.set(size, move(bitmap)); } + +GIcon GIcon::default_icon(const String& name) +{ + auto bitmap16 = GraphicsBitmap::load_from_file(String::format("/res/icons/16x16/%s.png", name.characters())); + auto bitmap32 = GraphicsBitmap::load_from_file(String::format("/res/icons/32x32/%s.png", name.characters())); + return GIcon(move(bitmap16), move(bitmap32)); +} diff --git a/LibGUI/GIcon.h b/LibGUI/GIcon.h index bfb48496ba..c0b3d15cdf 100644 --- a/LibGUI/GIcon.h +++ b/LibGUI/GIcon.h @@ -25,6 +25,8 @@ public: GIcon(const GIcon&); ~GIcon() { } + static GIcon default_icon(const String&); + GIcon& operator=(const GIcon& other) { m_impl = other.m_impl.copy_ref(); |