Bug 505058

Summary: Inconsistent appearance with multiple output devices and a single input device
Product: [Plasma] plasmashell Reporter: Iyán M. V. <me>
Component: Audio Volume widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cwo.kde, isma.af
Priority: NOR    
Version First Reported In: 6.3.91   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.3.91
Sentry Crash Report:
Attachments: Screenshot
volume applet with two output and one input devices, showing the input device with appropriate padding
Two input devices and one output

Description Iyán M. V. 2025-05-31 12:45:39 UTC
Created attachment 181928 [details]
Screenshot

SUMMARY
I guess this is due to the recent changes described here (https://blogs.kde.org/2025/05/24/this-week-in-plasma-time-of-day-wallpapers/) regarding the volume widget, which are now integrated in Plasma 6.4 Beta 2.

This is subjective, and probably an edge case not considered in those MRs, but when there are multiple output devices, and a single input device, the input device slider and the mute icon is not properly padded to the right so that it aligns with the output devices (see screenshot).

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.91
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 22 × Intel® Core™ Ultra 7 155H
Memory: 32 GiB of RAM (30.9 GiB usable)
Graphics Processor: Intel® Arc
Manufacturer: LENOVO
Product Name: 21KDS00600
System Version: ThinkPad X1 Carbon Gen 12
Comment 1 Iyán M. V. 2025-05-31 12:49:34 UTC
I guess the opposite case, multiple input devices and a single output device, was improved here:
https://invent.kde.org/plasma/plasma-pa/-/merge_requests/340
Comment 2 Ismael Asensio 2025-05-31 13:54:06 UTC
I cannot reproduce

This should already be fixed by https://invent.kde.org/plasma/plasma-pa/-/merge_requests/351, which is included in the Plasma 6.4 Beta2  
(Commit https://invent.kde.org/plasma/plasma-pa/-/commit/79e7d38f13d12a2c9ba907af4d6e791b7e088dcc on the Plasma 6.4 branch)

Is it the plasma-pa package also updated to the beta2 version? (6.3.91)
Comment 3 cwo 2025-05-31 14:17:16 UTC
Created attachment 181934 [details]
volume applet with two output and one input devices, showing the input device with appropriate padding

Hm, this is weird - there shouldn't be anything specifics to inputs or outputs here, the same condition should cover both.

And when I add an output device, the single input device is padded, see the attached screen shot.

Going over the code again, I don't immediately see how this could happen.

Could I ask you to test whether it works correctly if only output and two input devices are present?

You can get rid of existing outputs by disabling them in System Settings, and you can enable additional dummy input devices with 

pactl load-module module-null-sink media.class=Audio/Source/Virtual

Is there anything unusual about your setup that may be relevant?
Comment 4 Iyán M. V. 2025-05-31 19:16:10 UTC
Created attachment 181940 [details]
Two input devices and one output

I observe the same with single output and two input devices.
Comment 5 Iyán M. V. 2025-05-31 19:18:29 UTC
I don't think I have any special setup regarding audio on my laptop.

I can confirm I'm running plasma-pa 6.3.91. It got updated in the kde-unstable repo in Arch Linux here:
https://gitlab.archlinux.org/archlinux/packaging/packages/plasma-pa/-/commit/88cbd6c31671c6798f31f789e3bc207b2e398f0b

Any other ideas to help debug this?
Comment 6 cwo 2025-06-01 08:00:29 UTC
(In reply to Iyán M. V. from comment #5)
> Any other ideas to help debug this?

I'm at a loss here. While investigating this yesterday, I found that there was indeed a bug regarding this if you used it in a Right-to-Left locale like Arabic or Hebrew, where I got the adjustment wrong (some things need to be flipped left/right in the code in that case, and others must not, and I got the two flipped). But that shouldn't be the solution to your problem, that seems to be a Left-to-Right layout.

Ah, looking through the Beta 2 tarball, I see it's missing the cherry-pick for the label alignment change, that is only in master at the moment. I just started the cherry-pick for that.

I'm still confused why the mute button isn't indented in that case, the code for that was cherry-picked and seems to be in the 6.3.91 tarball. I'll build that tag and see if I can reproduce there.
Comment 7 cwo 2025-06-01 08:58:21 UTC
I can reproduce on the 6.3.91 tag, but not anymore on the current Plasma 6.4 branch (nor master). I'm not quite sure why the mute button isn't aligned in that case as the code for that is there, but I'm not sure spending more time on investigating that is worth it when the problem is resolved. The fix will be in 6.4.0.
Comment 8 Iyán M. V. 2025-06-01 09:32:35 UTC
Thanks for confirming that this will be fixed in the final version :)
Just a pity not all the relevant changes were included in the Beta 2 release.

I rebuilt the Arch package from kde-unstable with the commit that was missing in the Plasma 6.4 branch:
https://invent.kde.org/plasma/plasma-pa/-/commit/e485938d02e37d381a3aebe02763a2154b955a99

And that solves the issue. I guess the relevant change is the one happening in applet/main.qml in that commit, not in applet/ListItemBase.qml.
Comment 9 cwo 2025-06-01 09:37:54 UTC
(In reply to Iyán M. V. from comment #8)
> And that solves the issue. I guess the relevant change is the one happening
> in applet/main.qml in that commit, not in applet/ListItemBase.qml.

D'oh - yeah, the property that controls the whole thing was added in that commit as well, so it makes sense that the mute button also wouldn't work. Mystery solved.

Thanks for testing, both the beta and the patch!