-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add :icon and :icon-size properties to the image widget #955
Conversation
2747d17
to
7878fbe
Compare
@elkowar Could you take a look, please? I think this should be ready for review, I've been test driving it for a few days without any hitch. |
Any news on this? Would like to see this feature! |
7878fbe
to
a7c53c3
Compare
I have been using Eww with this patch daily since the day I submitted it, works great for me. I have just rebased it and would pretty much like to have it merged, or if there's something wrong with it I would be more than happy to have some feedback and rewrite the patch accordingly. Cheers, and happy solstice! ✨ |
I build this patch without problems and it is running fine for me on wayland. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is running fine in my build, code is clean. Please merge.
a7c53c3
to
90ea0d4
Compare
Add a new :icon property which allows using icons from the currently selected theme. For completeness, add :icon-size as well. As a nice extra, GTK automatically makes such images follow the selected icon theme.
90ea0d4
to
414363d
Compare
Thanks for merging this 🙌🏼 |
Would this work for application icons? (e.g. for a taskbar widget) |
Yes, it will work for any icon present in the currently active icon theme 👍🏼 |
Description
Add a new
:icon
property which allows using icons from the currently selected theme. For completeness, add:icon-size
as well. As a nice extra, GTK automatically makes such images follow the selected icon theme.Usage
The following shows how to use an image from the icon theme using the new properties:
Showcase
Bar with launchers, each one is a
(button :onclick "..." :tooltip "..." (image :icon "..."))
element:Short screen capture showing how the icons follow the current GTK icon theme:
screenrecord.mp4
Additional Notes
First contribution, after discovering Eww yesterday. I hope the changes are done well.
Checklist
Please make sure you can check all the boxes that apply to this PR.
docs/content/main
directory has been adjusted to reflect my changes.cargo fmt
to automatically format all code before committing