mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibDesktop: Add support for IconPath in AppFile
With `IconPath`, you can override the icon used for the application shortcut. This currently only supports resolving the icon through `GUI::FileIconProvider`, the implementation for pointing to actual image files is left as an exercise for the reader.
This commit is contained in:
parent
0ec39aafb6
commit
1a4b1ecd04
2 changed files with 17 additions and 2 deletions
|
@ -27,13 +27,13 @@ public:
|
|||
String executable() const;
|
||||
String category() const;
|
||||
String description() const;
|
||||
String icon_path() const;
|
||||
GUI::Icon icon() const;
|
||||
bool run_in_terminal() const;
|
||||
Vector<String> launcher_file_types() const;
|
||||
Vector<String> launcher_protocols() const;
|
||||
bool spawn() const;
|
||||
|
||||
GUI::Icon icon() const { return GUI::FileIconProvider::icon_for_path(executable()); };
|
||||
|
||||
private:
|
||||
explicit AppFile(const StringView& path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue