Commit a2481a94 authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Nate Graham

Fix sizing of tooltip with media controls without thumbnail

When an application that exposes media controls is pinned to the
taskbar, on a different desktop and the task manager is configured to
"only show tasks from the current desktop", hovering over the entry in
the taskbar will show a cramped and broken tooltip with media controls
overlapping the media title. While this is ugly, it has the additional
effect that all other tooltips end up broken until the tooltip is
reloaded by hovering a grouped entry.

To fix this, the media controls follow the header's maximum width rather
than the width, the two scrolling texts are given a proper implicitWidth
and the media controls are updated to match the header's margins and
spacing.
parent 0c8e0e7d
......@@ -244,7 +244,10 @@ ColumnLayout {
// Player controls row
RowLayout {
Layout.maximumWidth: header.width
Layout.maximumWidth: header.Layout.maximumWidth
// Match margins of header
Layout.leftMargin: isWin ? 0 : PlasmaCore.Units.gridUnit / 2
Layout.rightMargin: isWin ? 0 : PlasmaCore.Units.gridUnit / 2
visible: hasPlayer
enabled: canControl
......@@ -253,6 +256,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.topMargin: PlasmaCore.Units.smallSpacing
Layout.bottomMargin: PlasmaCore.Units.smallSpacing
Layout.rightMargin: isWin ? PlasmaCore.Units.smallSpacing : PlasmaCore.Units.largeSpacing
spacing: 0
ScrollableTextWrapper {
......@@ -260,6 +264,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.preferredHeight: songText.height
implicitWidth: songText.implicitWidth
PlasmaComponents3.Label {
id: songText
......@@ -279,6 +284,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.preferredHeight: artistText.height
implicitWidth: artistText.implicitWidth
visible: artistText.text !== ""
PlasmaExtras.DescriptiveLabel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment