Zren / plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84 stars 23 forks source link

Volume applet: Use theme icons for non-app mixer elements, based on Port #36

Open AndydeCleyre opened 8 years ago

AndydeCleyre commented 8 years ago

Thanks again for this, and for making it better!

I think the icon choices for the mixer elements could be improved.

screenshot_20160909_133151

The generic speaker icon is identical to the ones underneath the sliders, which seems redundant and obscures the difference in function. The new HDMI icon feels out of place.

I suggest the following user theme icons be used for the corresponding Port values on the mixer elements:

Port Icon
HDMI / tv-symbolic
Speakers audio-speakers-symbolic
Bluetooth Output bluetooth-symbolic
Line Out audio-headphones-symbolic
Internal Microphone audio-input-microphone-symbolic
Microphone audio-input-microphone-symbolic

I notice the microphone icon gets colorized when muted. I don't know how exactly that's accomplished right now, but as all the suggested icons are symbolic, it should be possible to colorize them if you want to apply plasma theme colors and mute colors to them.

Zren commented 8 years ago

Unfortunately, none of those are in the default breeze icon set (/usr/share/icons/breeze/). I could probably check if the symbolic icon exists, then use the fallback coloured version if it doesn't.

Zren commented 8 years ago

So I wrote some simple fallback code, but found out that breeze's audio-speakers-symbolic is the "volume icon", which means that while it'll look good in papyrus, it would then look bad with breeze icons. :/

AndydeCleyre commented 8 years ago

@Zren ah, I can see that they link the device icon audio-speakers-symbolic (clearly within a devices directory) to the status icon audio-volume-high (clearly within a status directory).

In my opinion this is a bug in the Breeze icon set. So I reported it.

it would then look bad with breeze icons

Doesn't everything? 😂

Andreas-Kainz commented 8 years ago

Hi as breeze icon maintainer I'm still open to add new icons or change stuff.

Zren commented 8 years ago

The goal is to find a good icon to represent the 3.5mm headphone jack "speaker" in the system tray, that's different from the current volume icon. Ideally it should be different in all icon themes.

Plasma-pa uses the audio-card in the widget configuration page. My widget shows both the "built-in audio device" microphone and speaker at the same time however, which both use audio-card, so we need a distinct icon for each.

Here's an in progress list of all icons side by side (beware as I update it with other themes).

audio-card (device) (plasma-pa default)

audio-card-symbolic

speaker (action)

audio-speakers

audio-speakers-symbolic (device)

Zren commented 8 years ago

So my code the fallback to certain icons doesn't work as well as I hoped. IconItem { source: 'audio-speakers' } is treated as a valid icon since it is resolving to a mimetype icon. Every "missing" icon starting with "audio" uses that so that

image

I've figured out a way to use my own svg that follows the color scheme. So I could just use a bunch of good icons instead of leaving it up to the theme. It won't use the color scheme in the tooltip though since I need to load it with SvgItem to use the color scheme.

PlasmaCore.SvgItem {
    svg: PlasmaCore.Svg {
        imagePath: Qt.resolvedUrl('../icons/' + mixerItem.icon + '.svg')
    }
}

Anyways, I bound speakers starting with bluez_sink. to the preferences-system-bluetooth icon which is a fairly symbolic icon.