Commit 917396e8 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

fix clickable zones in header bar to be always maximized

avoid the clickable zones for artist, album to be always at maximum
width and extending further beyond the text
parent 1ae2db61
...@@ -165,6 +165,7 @@ FocusScope { ...@@ -165,6 +165,7 @@ FocusScope {
Layout.leftMargin: (!LayoutMirroring.enabled && !portrait && !isMaximized)? contentZone.width * 0.15: 4 * Kirigami.Units.largeSpacing Layout.leftMargin: (!LayoutMirroring.enabled && !portrait && !isMaximized)? contentZone.width * 0.15: 4 * Kirigami.Units.largeSpacing
Layout.topMargin: isMaximized? 4 * Kirigami.Units.largeSpacing : 0 Layout.topMargin: isMaximized? 4 * Kirigami.Units.largeSpacing : 0
Layout.bottomMargin: isMaximized? 4 * Kirigami.Units.largeSpacing : 0 Layout.bottomMargin: isMaximized? 4 * Kirigami.Units.largeSpacing : 0
Layout.maximumWidth: contentZone.width - 2 * ((!portrait && !isMaximized) ? contentZone.width * 0.15 : 4 * Kirigami.Units.largeSpacing)
Item { Item {
id: images id: images
...@@ -238,14 +239,14 @@ FocusScope { ...@@ -238,14 +239,14 @@ FocusScope {
Layout.fillHeight: true Layout.fillHeight: true
Layout.maximumHeight: (headerBar.height - playControlItem.height - 8 * Kirigami.Units.largeSpacing) < gridLayoutContent.height ? (headerBar.height - playControlItem.height - 8 * Kirigami.Units.largeSpacing): gridLayoutContent.height Layout.maximumHeight: (headerBar.height - playControlItem.height - 8 * Kirigami.Units.largeSpacing) < gridLayoutContent.height ? (headerBar.height - playControlItem.height - 8 * Kirigami.Units.largeSpacing): gridLayoutContent.height
Layout.maximumWidth: gridLayoutContent.width
LabelWithToolTip { LabelWithToolTip {
id: mainLabel id: mainLabel
text: title text: title
Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop
Layout.maximumWidth: gridLayoutContent.width
horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft
elide: Text.ElideRight elide: Text.ElideRight
// Hardcoded because the headerbar blur always makes a dark-ish // Hardcoded because the headerbar blur always makes a dark-ish
...@@ -269,9 +270,9 @@ FocusScope { ...@@ -269,9 +270,9 @@ FocusScope {
LabelWithToolTip { LabelWithToolTip {
id: authorLabel id: authorLabel
text: artist text: artist
Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop
Layout.maximumWidth: gridLayoutContent.width
horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft
elide: Text.ElideRight elide: Text.ElideRight
// Hardcoded because the headerbar blur always makes a dark-ish // Hardcoded because the headerbar blur always makes a dark-ish
...@@ -294,9 +295,9 @@ FocusScope { ...@@ -294,9 +295,9 @@ FocusScope {
LabelWithToolTip { LabelWithToolTip {
id: albumLabel id: albumLabel
text: album text: album
Layout.fillWidth: true
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop Layout.alignment: (portrait? Qt.AlignHCenter: Qt.AlignLeft) | Qt.AlignTop
Layout.maximumWidth: gridLayoutContent.width
horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft horizontalAlignment: portrait? Text.AlignHCenter : Text.AlignLeft
elide: Text.ElideRight elide: Text.ElideRight
// Hardcoded because the headerbar blur always makes a dark-ish // Hardcoded because the headerbar blur always makes a dark-ish
...@@ -332,6 +333,7 @@ FocusScope { ...@@ -332,6 +333,7 @@ FocusScope {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.alignment: Qt.AlignRight | Qt.AlignTop
Layout.maximumWidth: gridLayoutContent.width
sourceComponent: SimplePlayListView { sourceComponent: SimplePlayListView {
anchors.fill: parent anchors.fill: parent
......
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