<table><tr><td style="">guilhermesilva added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8054">View Revision</a></tr></table><br /><div><div><p>Hi guys! Sorry to "necro-bump" this issue, but I wanted to share my opinion on this new approach of setting the device icon. From what I've been seeing in random screenshots of the <tt style="background: #ebebeb; font-size: 13px;">plasma-pa</tt> applet, most of the times they all have the same icon: <tt style="background: #ebebeb; font-size: 13px;">audio-card.svg</tt>. That's because, apparently, for a lot of people (myself included), the <tt style="background: #ebebeb; font-size: 13px;">device.form_factor</tt> property is set to <tt style="background: #ebebeb; font-size: 13px;">internal</tt> in all sinks:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="console" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">$ pacmd list sinks | grep device.form_factor</span>
<span style="color: #808080">device.form_factor = "internal"</span>
<span style="color: #808080">device.form_factor = "internal"</span>
<span style="color: #808080">device.form_factor = "internal"</span>
<span style="color: #808080">device.form_factor = "internal"</span></pre></div>

<p>So, the the device list in <tt style="background: #ebebeb; font-size: 13px;">plasma-pa</tt> end up looking like this:</p>

<p><a href="https://phabricator.kde.org/F5820254" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5820254: new.png</a></p>

<p>While that's not really a big deal for most people, I really think the previous "hacky" approach delivered better-looking results:</p>

<p><a href="https://phabricator.kde.org/F5820257" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F5820257: previous.png</a></p>

<p>I don't know if that's an issue with PulseAudio, but for now I decided to downgrade the <tt style="background: #ebebeb; font-size: 13px;">plasma-pa</tt> package back to version <tt style="background: #ebebeb; font-size: 13px;">5.11.5</tt>. I've also made an adaptation in <tt style="background: #ebebeb; font-size: 13px;">contents/ui/DeviceListItem.qml</tt>, because my speakers port is named <tt style="background: #ebebeb; font-size: 13px;">analog-output-lineout</tt>, so I wasn't getting the proper icon as well. Ah, I've also changed the <tt style="background: #ebebeb; font-size: 13px;">audio-speakers-symbolic</tt> icon to just <tt style="background: #ebebeb; font-size: 13px;">audio-speakers</tt> because I didn't like it:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="diff" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">diff --git a/applet/contents/ui/DeviceListItem.qml b/applet/contents/ui/DeviceListItem.qml</span>
<span style="color: #000080">index 642ca02..2302160 100644</span>
<span style="color: #a00000">--- a/applet/contents/ui/DeviceListItem.qml</span>
<span style="color: #00a000">+++ b/applet/contents/ui/DeviceListItem.qml</span>
<span style="color: #800080">@@ -27,8 +27,8 @@ ListItemBase {</span>
     label: currentPort ? i18nc("label of device items", "%1 (%2)", currentPort.description, Description) : Description
     icon: {
         if (currentPort) {
<span style="color: #a00000">-            if (currentPort.name.indexOf("speaker") != -1) {</span>
<span style="color: #a00000">-                return "audio-speakers-symbolic";</span>
<span style="color: #00a000">+            if (currentPort.name.indexOf("speaker") != -1 || currentPort.name.indexOf("lineout") != -1) {</span>
<span style="color: #00a000">+                return "audio-speakers";</span>
             } else if (currentPort.name.indexOf("headphones") != -1) {
                 return "audio-headphones";
             } else if (currentPort.name.indexOf("hdmi") != -1) {</pre></div>

<p>I hope you guys can reconsider the decision of relying on <tt style="background: #ebebeb; font-size: 13px;">device.form_factor</tt>.</p>

<p>Thanks a lot!</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R115 Plasma Audio Volume Applet</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8054">https://phabricator.kde.org/D8054</a></div></div><br /><div><strong>To: </strong>antlarr, Plasma, davidedmundson, drosca<br /><strong>Cc: </strong>guilhermesilva, andreask, drosca, sebas, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, apol, mart<br /></div>