Skip to content

applets/mediacontroller: Fix label width overflow in horizontal panel

Ismael Asensio requested to merge work/iasensio/mediacontroller-panel-width into master

Reason for the change

We need to limit the width of the internal item (playerRow) to the available width of the applet so that the labels don't overflow.

The requested Layout.preferredWidth of the applet is still the implicitWidth so the applet's general size calculations shouldn't have any changes.

Test plan

Have the media player applet on a horizontal panel and another applet "competing" for the space (for instance the Text Task Manager being full). In this case, the applet's available space is smaller than the requested preferredWidth.

Alternatively, the issue can be reproduced on plasmoidviewer setting the Location to Bottom Edge (or Top Edge)

Screenshots or screen recordings

Before After
On the panel

mc-panel-before

mc-panel-after

On plasmoidviewer

(Location: Bottom Edge)

mc-plasmoidviewer-before

mc-plasmoidviewer-after

Bugs fixed

Not currently reported. I guess it takes somewhat specific non-defaults conditions, mainly using the classic task manager with text, and of course adding the media controller widget to the panel

I've marked it as cherry-pick to 6.1, but I'll trust you if you find that riskier.

Edited by Ismael Asensio

Merge request reports