Skip to content

Load system-provided platform icons for different file types (for native, non-emscripten platforms) #113

@ghost

Description

Here's an example for how I do it in a ImFileDialog I forked: LINK. I think it would be a nice addition to have in your product as well. Mine tied to specific windowing and graphics system bindings making it less flexible than your solution so I find it would be cool to see both projects have this. Feel free to borrow logic from my code to get it working as you see fit.

  1. Windows uses standard Win32 - Preview.
  2. MacOS/Darwin needs Cocoa, AppKit - Preview.
  3. Linux/*BSD/SunOS PNG FreeDesktop icon themes need STBImage, GTK+, GLIB, GIO - Preview.
  4. Linux/*BSD/SunOS SVG FreeDesktop icon themes need LunaSVG, GTK+, GLIB, GIO - Preview.
  5. Android/iOS you're on your own with mobile if you want to support that - never worked with it.
  6. As the title suggests I believe doing this is not possible with emscripten.

Keep in mind while most desktop environments use PNG icon themes, KDE's default Breeze Theme is very commonly used by KDE users and KDE is a very popular DE, making it ideally pretty necessary to add LunaSVG as a git submodule to support those users.


As a separate note you may use this code to get bookmarks or recommended paths to have on a side pane: LINK. Although I don't find that worth having as its own ticket, as it's not that important, but will provide a way to do this which will grab system provided localization for these folders. Anyway, let me know what you think and I am happy to help some if I find time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    To Do / Wip

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions