applets/mediacontroller: fix two code errors

1. `undefined` is an invalid value for `Layout.Preferred[something]`; instead
   use -1 which is the correct thing.
2. `Layout.maximumLineCount` doesn't exist; use `Layout.maximumWidth` which was
   probably the intention.
wilder-5.26
Nate Graham 4 years ago committed by Fushan Wen
parent f24ab58847
commit ec2f242933
  1. 4
      applets/mediacontroller/contents/ui/CompactRepresentation.qml

@ -17,7 +17,7 @@ import org.kde.plasma.plasmoid 2.0
MouseArea {
id: compactRepresentation
Layout.preferredWidth: !inTray && !isVertical ? (iconLoader.active ? iconLoader.implicitWidth : playerRow.width) : undefined
Layout.preferredWidth: !inTray && !isVertical ? (iconLoader.active ? iconLoader.implicitWidth : playerRow.width) : -1
readonly property bool isVertical: Plasmoid.formFactor === PlasmaCore.Types.Vertical
readonly property bool inPanel: [PlasmaCore.Types.TopEdge, PlasmaCore.Types.RightEdge, PlasmaCore.Types.BottomEdge, PlasmaCore.Types.LeftEdge].includes(Plasmoid.location)
@ -131,7 +131,7 @@ MouseArea {
id: songArtist
Layout.fillHeight: true
Layout.maximumWidth: songTitle.Layout.maximumLineCount
Layout.maximumWidth: songTitle.Layout.maximumWidth
visible: root.artist
elide: Text.ElideRight

Loading…
Cancel
Save