Closed nazar-pc closed 6 years ago
I don't like the patch. It's too much logic stuffed into the function. The debug messages caused by it will also be inconsistent/confusing if ones is trying to debug. Also see https://github.com/nicklan/pnmixer/blob/b64b2444a39329efbee203ad6dcddd2d4f35dc5f/src/ui-tray-icon.c#L87
I agree it doesn't look very nice, do you have any suggestions how to accomplish the same behavior in a nicer way?
We could try enhancing the function to something like
static GdkPixbuf *
pixbuf_new_from_stock(const gchar **icon_names, gint size)
Or even using GArray
(although that might be overkill for internal API, right?)
Sounds like a good idea, however, I'm not a C developer, my knowledge here are very limited.
In some themes like ubuntu-mono-dark/ubuntu-mono-light, icons are only present with
-panel
suffix. Numix theme also has them (alongside with normal variant).I've tweaked source code to try those
-panel
icons first, otherwise with some themes it uses default awful icons.One more tweak includes preferring
audio-volume-low-zero
foraudio-volume-off
beforeaudio-volume-low
. These icons are present in all themes mentioned above.