Skip to content

Updated icons to use system icon theme, using symbolic icons where possible. - #177

Open
newhoa wants to merge 9 commits into
squentin:masterfrom
newhoa:master
Open

Updated icons to use system icon theme, using symbolic icons where possible.#177
newhoa wants to merge 9 commits into
squentin:masterfrom
newhoa:master

Conversation

@newhoa

@newhoa newhoa commented Jun 25, 2020

Copy link
Copy Markdown

I noticed in the Gtk3 issue thread you mentioned that the icons needed work. It made me curious so I just looked to see what could be changed.

I don't know if this is what you had in mind, but many icons were missing or using png icons included with gmusicbrowser itself. I updated most of the icon entries to instead use system theme icons. I changed most of the icons to adhere to the FreeDesktop.org Icon Naming Spec. Additionally, I went ahead and set them all as symbolic icons. Doing this makes the icons adapt to the user theme whether a light or dark theme is used. The menu icons highlight on mouseover and the Play/Pause/Stop icons can be more easily seen when the row is selected in the playlist. The trade-off is that it's all monochrome basically. I also removed as many references to the hardcoded/included gmusicbrowser icons in the pix folder (using system theme icons instead).

I made sure to use only icons that were included in the default desktop icon themes, and modern icon themes in general. I checked to make sure all icons were available under the default Gnome/XFCE icon theme (Adwaita), default KDE icon theme (Breeze), default MATE icon theme, and the Elementary icon theme which gmusicbrowser already included some icons of. I also checked to make sure they were working in all of the included Layouts.

I'll keep making adjustments as I continue to use it if I notice any that I missed. I tried to pick icons that were appropriate to the action. For example, the queue icon is actually a format-indent icon, but it looks like a list with a "play next" looking arrow icon in pretty much every theme. Maybe some of these could be better (or might require new custom icons which I can help with as well if needed), but for now I think it is more functional and complete and will work for everyone.

I don't know how to change some of them like the Rating icons and the Volume icons (they both seem to need code changes, and that's beyond what I know). I also couldn't figure out how to change the dialog button icons (Close, About, etc) but will look into it more later.

These were all basically just icon name changes/replacements. I did add ellipses to some of the menu entries that require further action. And I also added some icons to the right click menu entries, tabs (Year, Info, Lyrics, etc), and menus where some were missing. But I didn't change any functionality or any code beyond cosmetics.

I'm not sure if this is something you want (maybe the symbolic icons aren't colorful enough, or maybe you wanted the icon code reworked completely, etc). But I enjoyed doing it and just thought I'd throw it out there in case it helps.

Thanks for the amazing program!

@newhoa newhoa mentioned this pull request Jun 25, 2020
@Denebet

Denebet commented Dec 11, 2024

Copy link
Copy Markdown

Good morning,

I just published a theme for gmusicbrowser at https://www.pling.com/p/2230712/. On the one hand, I encountered a small difficulty with an icon, on the other hand our work should complement each other, it seems to me. This is why, if you are still available and motivated, I suggest you contact me (systemelibre@free.fr) to consider a modest collaboration.

bor added a commit to bor/gmusicbrowser that referenced this pull request Feb 16, 2026
Modern icon themes (Adwaita 48+) no longer provide gtk-* stock icon
names. Add fallback mappings from deprecated gtk2 stock IDs to their
freedesktop standard equivalents (e.g. gtk-media-play to
media-playback-start). The mappings are only used when the old names
are not found in the current theme, so bundled gmusicbrowser themes
that ship their own gtk-*.png files continue to work as before.

Also fix search entry icons which used set_icon_from_stock directly
instead of going through check_icon_name.

Related to squentin#57, squentin#177
bor added a commit to bor/gmusicbrowser that referenced this pull request Feb 16, 2026
Modern icon themes (Adwaita 48+) no longer provide gtk-* stock icon
names. Add fallback mappings from deprecated gtk2 stock IDs to their
freedesktop standard equivalents (e.g. gtk-media-play to
media-playback-start). The mappings are only used when the old names
are not found in the current theme, so bundled gmusicbrowser themes
that ship their own gtk-*.png files continue to work as before.

Also fix search entry icons which used set_icon_from_stock directly
instead of going through check_icon_name.

Related to squentin#57, squentin#177
yennor pushed a commit to yennor/gmusicbrowser that referenced this pull request Mar 19, 2026
Modern icon themes (Adwaita 48+) no longer provide gtk-* stock icon
names. Add fallback mappings from deprecated gtk2 stock IDs to their
freedesktop standard equivalents (e.g. gtk-media-play to
media-playback-start). The mappings are only used when the old names
are not found in the current theme, so bundled gmusicbrowser themes
that ship their own gtk-*.png files continue to work as before.

Also fix search entry icons which used set_icon_from_stock directly
instead of going through check_icon_name.

Related to squentin#57, squentin#177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants