nicklan / pnmixer

Volume mixer for the system tray
GNU General Public License v3.0
152 stars 32 forks source link

Use better icons if possible #167

Closed nazar-pc closed 6 years ago

nazar-pc commented 6 years ago

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 for audio-volume-off before audio-volume-low. These icons are present in all themes mentioned above.

hasufell commented 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

nazar-pc commented 6 years ago

I agree it doesn't look very nice, do you have any suggestions how to accomplish the same behavior in a nicer way?

hasufell commented 6 years ago

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?)

nazar-pc commented 6 years ago

Sounds like a good idea, however, I'm not a C developer, my knowledge here are very limited.

hasufell commented 6 years ago

Try https://github.com/nicklan/pnmixer/tree/feature/alternative-icons