-
Notifications
You must be signed in to change notification settings - Fork 145
Use libsfdo-based symbolic/scalable/SVG icon lookup #584
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
base: master
Are you sure you want to change the base?
Conversation
Need to install the libsfdo library on the build server to pass the auto checks :) |
Thanks for the patch! Instead of maintaining two codepaths, could we get rid of the old one? Or are there some lookups we can't support with the new one?
This can be done by adding new packages to |
Seems like this is a separate, new feature - could you split it in a separate commit, or leave it for a future PR? |
Also, it seems like this PR description is (partly?) AI-generated. Is that true? If so, I'd strongly recommend to not use AI, it adds a lot of noise and is cumbersome to decipher. |
The issue is that libsfdo uses the theme name rather than the path when looking up for icons. Because of this detail, it wasn't possible to rely on the existing option and simultaneously remove the legacy logic. We need your input on how to proceed if we're planning to switch to the new approach.
Yes, I use AI for writing documentation and other human-readable parts of my work, as well as for generating tests - otherwise, my descriptions would be too brief and uninformative. I'm good at coding, but not so good at communicating with people. :( |
This PR introduces native Freedesktop Icon Theme support in Mako by leveraging libsfdo for scalable (.svg) and high-DPI icons. Previously, Mako only searched for bitmap icons under hard-coded icon-path directories. Now, users can specify one or more icon themes (e.g. Adwaita:Tela-green-dark) in their configuration, and Mako will:
Changes:
Accepts a colon-separated list of Freedesktop icon theme names.
Example:
libsfdo integration
Create and configure an sfdo_icon_lookup context using the user’s icon-theme list.
Set desired icon size, output scale, and fallback theme (hicolor) via libsfdo.
Call sfdo_icon_theme_lookup() to fetch scalable and SVG icons.
Fallback behavior
If icon-theme is unset or libsfdo lookup fails, Mako reverts to its original icon-path + glob() search logic without any changes.
No breaking changes for users who don’t set icon-theme; existing behavior is preserved.
Testing:
Closes #555
CC: @arebaka