Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
time-killer-games opened this issue Dec 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@time-killer-games
Copy link

time-killer-games commented Dec 15, 2022

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.

@aiekick aiekick added the enhancement New feature or request label Dec 15, 2022
@aiekick
Copy link
Owner

aiekick commented Dec 15, 2022

Hello,

thansk for theses infos.

Im aware of this but for me its a bit compilcated for nothing. because just visual.
The goal of ImGuIFileDialog is not to mimic filedialog of OS's, juste propose more features than theses ones.
And i have no time at this moment.
But if you want you can propose a pull resquest

@aiekick aiekick moved this to To Do / Wip in ImGuiFileDialog Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do / Wip
Development

No branches or pull requests

2 participants